<!DOCTYPE HTML PUBLIC  "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<LINK REL="stylesheet" HREF="./stylesheets/man-cgi_openbsd.css" TYPE="text/css" media="all">
<LINK REL="stylesheet" HREF="./stylesheets/man_openbsd.css" TYPE="text/css" media="all">
<TITLE>tmux OpenBSD manual pages</TITLE>
</HEAD>
<BODY>
<!-- Begin page content. //-->

<div class="mandoc">
<table summary="Document Header" class="head" width="100%">
<col width="30%">
<col width="30%">
<col width="30%">
<tbody>
<tr>
<td class="head-ltitle">
TMUX(1)</td>
<td class="head-vol" align="center">
General Commands Manual</td>
<td class="head-rtitle" align="right">
TMUX(1)</td>
</tr>
</tbody>
</table>
<div class="section">
<h1 id="x4e414d45">NAME</h1> <b class="name">tmux</b> &#8212; <span class="desc">terminal multiplexer</span></div>
<div class="section">
<h1 id="x53594e4f50534953">SYNOPSIS</h1><table class="synopsis">
<col style="width: 4.00ex;">
<col>
<tbody>
<tr>
<td>
tmux</td>
<td>
&#91;<span class="opt"><b class="flag">&#45;2lCuv</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;c</b>&#160;<i class="arg">shell-command</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;f</b>&#160;<i class="arg">file</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;L</b>&#160;<i class="arg">socket-name</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;S</b>&#160;<i class="arg">socket-path</i></span>&#93; &#91;<span class="opt"><i class="arg">command</i>&#160;&#91;<span class="opt"><i class="arg">flags</i></span>&#93;</span>&#93;</td>
</tr>
</tbody>
</table>
</div>
<div class="section">
<h1 id="x4445534352495054494f4e">DESCRIPTION</h1> <b class="name">tmux</b> is a terminal multiplexer: it enables a number of terminals to be created, accessed, and controlled from a single screen. <b class="name">tmux</b> may be detached from a screen and continue running in the background, then later reattached.<p>
When <b class="name">tmux</b> is started it creates a new <span class="emph">session</span> with a single <span class="emph">window</span> and displays it on screen. A status line at the bottom of the screen shows information on the current session and is used to enter interactive commands.<p>
A session is a single collection of <span class="emph">pseudo terminals</span> under the management of <b class="name">tmux</b>. Each session has one or more windows linked to it. A window occupies the entire screen and may be split into rectangular panes, each of which is a separate pseudo terminal (the <a class="link-man" href="/cgi-bin/man.cgi?query=pty&amp;sec=4">pty(4)</a> manual page documents the technical details of pseudo terminals). Any number of <b class="name">tmux</b> instances may connect to the same session, and any number of windows may be present in the same session. Once all sessions are killed, <b class="name">tmux</b> exits.<p>
Each session is persistent and will survive accidental disconnection (such as <a class="link-man" href="/cgi-bin/man.cgi?query=ssh&amp;sec=1">ssh(1)</a> connection timeout) or intentional detaching (with the &#8216;<code class="lit">C-b d</code>&#8217; key strokes). <b class="name">tmux</b> may be reattached using:<p>
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
<code class="lit">$ tmux attach</code></div>
</blockquote>
<p>
In <b class="name">tmux</b>, a session is displayed on screen by a <span class="emph">client</span> and all sessions are managed by a single <span class="emph">server</span>. The server and each client are separate processes which communicate through a socket in <i class="file">/tmp</i>.<p>
The options are as follows:<dl style="margin-top: 0.00em;margin-bottom: 0.00em;" class="list list-tag">
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="flag">&#45;2</b></dt>
<dd class="list-tag" style="margin-left: 0.50ex;">
Force <b class="name">tmux</b> to assume the terminal supports 256 colours.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="flag">&#45;C</b></dt>
<dd class="list-tag" style="margin-left: 0.50ex;">
Start in control mode (see the <i class="link-sec"><a class="link-sec" href="#x434f4e54524f4c204d4f4445">CONTROL MODE</a></i> section). Given twice (<b class="flag">&#45;CC</b>) disables echo.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="flag">&#45;c</b> <i class="arg">shell-command</i></dt>
<dd class="list-tag" style="margin-left: 0.50ex;">
Execute <i class="arg">shell-command</i> using the default shell. If necessary, the <b class="name">tmux</b> server will be started to retrieve the <b class="cmd">default-shell</b> option. This option is for compatibility with <a class="link-man" href="/cgi-bin/man.cgi?query=sh&amp;sec=1">sh(1)</a> when <b class="name">tmux</b> is used as a login shell.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="flag">&#45;f</b> <i class="arg">file</i></dt>
<dd class="list-tag" style="margin-left: 0.50ex;">
Specify an alternative configuration file. By default, <b class="name">tmux</b> loads the system configuration file from <i class="file">/etc/tmux.conf</i>, if present, then looks for a user configuration file at <i class="file">~/.tmux.conf</i>.<p>
The configuration file is a set of <b class="name">tmux</b> commands which are executed in sequence when the server is first started. <b class="name">tmux</b> loads configuration files once when the server process has started. The <b class="cmd">source-file</b> command may be used to load a file later.<p>
<b class="name">tmux</b> shows any error messages from commands in configuration files in the first session created, and continues to process the rest of the configuration file.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="flag">&#45;L</b> <i class="arg">socket-name</i></dt>
<dd class="list-tag" style="margin-left: 0.50ex;">
<b class="name">tmux</b> stores the server socket in a directory under <span class="env">TMUX_TMPDIR</span>, <span class="env">TMPDIR</span> if it is unset, or <i class="file">/tmp</i> if both are unset. The default socket is named <span class="emph">default</span>. This option allows a different socket name to be specified, allowing several independent <b class="name">tmux</b> servers to be run. Unlike <b class="flag">&#45;S</b> a full path is not necessary: the sockets are all created in the same directory.<p>
If the socket is accidentally removed, the <span class="define">SIGUSR1</span> signal may be sent to the <b class="name">tmux</b> server process to recreate it.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="flag">&#45;l</b></dt>
<dd class="list-tag" style="margin-left: 0.50ex;">
Behave as a login shell. This flag currently has no effect and is for compatibility with other shells when using tmux as a login shell.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="flag">&#45;S</b> <i class="arg">socket-path</i></dt>
<dd class="list-tag" style="margin-left: 0.50ex;">
Specify a full alternative path to the server socket. If <b class="flag">&#45;S</b> is specified, the default socket directory is not used and any <b class="flag">&#45;L</b> flag is ignored.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="flag">&#45;u</b></dt>
<dd class="list-tag" style="margin-left: 0.50ex;">
<b class="name">tmux</b> attempts to guess if the terminal is likely to support UTF-8 by checking the first of the <span class="env">LC_ALL</span>, <span class="env">LC_CTYPE</span> and <span class="env">LANG</span> environment variables to be set for the string &quot;UTF-8&quot;. This is not always correct: the <b class="flag">&#45;u</b> flag explicitly informs <b class="name">tmux</b> that UTF-8 is supported.<p>
If the server is started from a client passed <b class="flag">&#45;u</b> or where UTF-8 is detected, the <b class="cmd">utf8</b> and <b class="cmd">status-utf8</b> options are enabled in the global window and session options respectively.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="flag">&#45;v</b></dt>
<dd class="list-tag" style="margin-left: 0.50ex;">
Request verbose logging. This option may be specified multiple times for increasing verbosity. Log messages will be saved into <i class="file">tmux-client-PID.log</i> and <i class="file">tmux-server-PID.log</i> files in the current directory, where <span class="emph">PID</span> is the PID of the server or client process.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<i class="arg">command</i> &#91;<span class="opt"><i class="arg">flags</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 0.50ex;">
This specifies one of a set of commands used to control <b class="name">tmux</b>, as described in the following sections. If no commands are specified, the <b class="cmd">new-session</b> command is assumed.</dd>
</dl>
</div>
<div class="section">
<h1 id="x4b45592042494e44494e4753">KEY BINDINGS</h1> <b class="name">tmux</b> may be controlled from an attached client by using a key combination of a prefix key, &#8216;<code class="lit">C-b</code>&#8217; (Ctrl-b) by default, followed by a command key.<p>
The default command key bindings are:<p>
<dl style="margin-top: 0.00em;margin-bottom: 0.00em;margin-left: 5.00ex;" class="list list-tag">
<dt class="list-tag" style="margin-top: 0.00em;">
C-b</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Send the prefix key (C-b) through to the application.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
C-o</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Rotate the panes in the current window forwards.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
C-z</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Suspend the <b class="name">tmux</b> client.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
!</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Break the current pane out of the window.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
&quot;</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Split the current pane into two, top and bottom.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
#</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
List all paste buffers.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
$</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Rename the current session.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
%</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Split the current pane into two, left and right.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
&amp;</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Kill the current window.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
'</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Prompt for a window index to select.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
,</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Rename the current window.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
-</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Delete the most recently copied buffer of text.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
.</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Prompt for an index to move the current window.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
0 to 9</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Select windows 0 to 9.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
:</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Enter the <b class="name">tmux</b> command prompt.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
;</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Move to the previously active pane.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
=</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Choose which buffer to paste interactively from a list.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
?</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
List all key bindings.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
D</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Choose a client to detach.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
[</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Enter copy mode to copy text or view the history.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
]</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Paste the most recently copied buffer of text.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
c</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Create a new window.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
d</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Detach the current client.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
f</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Prompt to search for text in open windows.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
i</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Display some information about the current window.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
l</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Move to the previously selected window.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
n</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Change to the next window.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
o</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Select the next pane in the current window.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
p</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Change to the previous window.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
q</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Briefly display pane indexes.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
r</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Force redraw of the attached client.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
s</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Select a new session for the attached client interactively.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
L</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Switch the attached client back to the last session.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
t</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Show the time.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
w</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Choose the current window interactively.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
x</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Kill the current pane.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
{</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Swap the current pane with the previous pane.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
}</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Swap the current pane with the next pane.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
~</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Show previous messages from <b class="name">tmux</b>, if any.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
Page Up</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Enter copy mode and scroll one page up.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
Up, Down</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
Left, Right</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Change to the pane above, below, to the left, or to the right of the current pane.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
M-1 to M-5</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Arrange panes in one of the five preset layouts: even-horizontal, even-vertical, main-horizontal, main-vertical, or tiled.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
M-n</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Move to the next window with a bell or activity marker.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
M-o</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Rotate the panes in the current window backwards.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
M-p</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Move to the previous window with a bell or activity marker.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
C-Up, C-Down</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
C-Left, C-Right</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Resize the current pane in steps of one cell.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
M-Up, M-Down</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
M-Left, M-Right</dt>
<dd class="list-tag" style="margin-left: 0.42ex;">
Resize the current pane in steps of five cells.</dd>
</dl>
<p>
Key bindings may be changed with the <b class="cmd">bind-key</b> and <b class="cmd">unbind-key</b> commands.</div>
<div class="section">
<h1 id="x434f4d4d414e4453">COMMANDS</h1> This section contains a list of the commands supported by <b class="name">tmux</b>. Most commands accept the optional <b class="flag">&#45;t</b> argument with one of <i class="arg">target-client</i>, <i class="arg">target-session</i> <i class="arg">target-window</i>, or <i class="arg">target-pane</i>. These specify the client, session, window or pane which a command should affect. <i class="arg">target-client</i> is the name of the <a class="link-man" href="/cgi-bin/man.cgi?query=pty&amp;sec=4">pty(4)</a> file to which the client is connected, for example either of <i class="file">/dev/ttyp1</i> or <i class="file">ttyp1</i> for the client attached to <i class="file">/dev/ttyp1</i>. If no client is specified, the current client is chosen, if possible, or an error is reported. Clients may be listed with the <b class="cmd">list-clients</b> command.<p>
<i class="arg">target-session</i> is the session id prefixed with a $, the name of a session (as listed by the <b class="cmd">list-sessions</b> command), or the name of a client with the same syntax as <i class="arg">target-client</i>, in which case the session attached to the client is used. When looking for the session name, <b class="name">tmux</b> initially searches for an exact match; if none is found, the session names are checked for any for which <i class="arg">target-session</i> is a prefix or for which it matches as an <a class="link-man" href="/cgi-bin/man.cgi?query=fnmatch&amp;sec=3">fnmatch(3)</a> pattern. If a single match is found, it is used as the target session; multiple matches produce an error. If a session is omitted, the current session is used if available; if no current session is available, the most recently used is chosen.<p>
<i class="arg">target-window</i> specifies a window in the form <span class="emph">session</span>:<span class="emph">window</span>. <span class="emph">session</span> follows the same rules as for <i class="arg">target-session</i>, and <span class="emph">window</span> is looked for in order: as a window index, for example mysession:1; as a window ID, such as @1; as an exact window name, such as mysession:mywindow; then as an <a class="link-man" href="/cgi-bin/man.cgi?query=fnmatch&amp;sec=3">fnmatch(3)</a> pattern or the start of a window name, such as mysession:mywin* or mysession:mywin. An empty window name specifies the next unused index if appropriate (for example the <b class="cmd">new-window</b> and <b class="cmd">link-window</b> commands) otherwise the current window in <span class="emph">session</span> is chosen. The special character &#8216;<code class="lit">!</code>&#8217; uses the last (previously current) window, &#8216;<code class="lit">^</code>&#8217; selects the highest numbered window, &#8216;<code class="lit">$</code>&#8217; selects the lowest numbered window, and &#8216;<code class="lit">+</code>&#8217; and &#8216;<code class="lit">-</code>&#8217; select the next window or the previous window by number. When the argument does not contain a colon, <b class="name">tmux</b> first attempts to parse it as window; if that fails, an attempt is made to match a session.<p>
<i class="arg">target-pane</i> takes a similar form to <i class="arg">target-window</i> but with the optional addition of a period followed by a pane index, for example: mysession:mywindow.1. If the pane index is omitted, the currently active pane in the specified window is used. If neither a colon nor period appears, <b class="name">tmux</b> first attempts to use the argument as a pane index; if that fails, it is looked up as for <i class="arg">target-window</i>. A &#8216;<code class="lit">+</code>&#8217; or &#8216;<code class="lit">-</code>&#8217; indicate the next or previous pane index, respectively. One of the strings <span class="emph">top</span>, <span class="emph">bottom</span>, <span class="emph">left</span>, <span class="emph">right</span>, <span class="emph">top-left</span>, <span class="emph">top-right</span>, <span class="emph">bottom-left</span> or <span class="emph">bottom-right</span> may be used instead of a pane index.<p>
The special characters &#8216;<code class="lit">+</code>&#8217; and &#8216;<code class="lit">-</code>&#8217; may be followed by an offset, for example:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
select-window -t:+2</pre>
<p>
When dealing with a session that doesn't contain sequential window indexes, they will be correctly skipped.<p>
<b class="name">tmux</b> also gives each pane created in a server an identifier consisting of a &#8216;<code class="lit">%</code>&#8217; and a number, starting from zero. A pane's identifier is unique for the life of the <b class="name">tmux</b> server and is passed to the child process of the pane in the <span class="env">TMUX_PANE</span> environment variable. It may be used alone to target a pane or the window containing it.<p>
<i class="arg">shell-command</i> arguments are <a class="link-man" href="/cgi-bin/man.cgi?query=sh&amp;sec=1">sh(1)</a> commands. This may be a single argument passed to the shell, for example:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
new-window 'vi /etc/passwd'</pre>
<p>
Will run:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
/bin/sh -c 'vi /etc/passwd'</pre>
<p>
Additionally, the <b class="cmd">new-window</b>, <b class="cmd">new-session</b>, <b class="cmd">split-window</b>, <b class="cmd">respawn-window</b> and <b class="cmd">respawn-pane</b> commands allow <i class="arg">shell-command</i> to be given as multiple arguments and executed directly (without &#8216;<code class="lit">sh -c</code>&#8217;). This can avoid issues with shell quoting. For example:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
$ tmux new-window vi /etc/passwd</pre>
<p>
Will run <a class="link-man" href="/cgi-bin/man.cgi?query=vi&amp;sec=1">vi(1)</a> directly without invoking the shell.<p>
<i class="arg">command</i> &#91;<span class="opt"><i class="arg">arguments</i></span>&#93; refers to a <b class="name">tmux</b> command, passed with the command and arguments separately, for example:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
bind-key F1 set-window-option force-width 81</pre>
<p>
Or if using <a class="link-man" href="/cgi-bin/man.cgi?query=sh&amp;sec=1">sh(1)</a>:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
$ tmux bind-key F1 set-window-option force-width 81</pre>
<p>
Multiple commands may be specified together as part of a <span class="emph">command sequence</span>. Each command should be separated by spaces and a semicolon; commands are executed sequentially from left to right and lines ending with a backslash continue on to the next line, except when escaped by another backslash. A literal semicolon may be included by escaping it with a backslash (for example, when specifying a command sequence to <b class="cmd">bind-key</b>).<p>
Example <b class="name">tmux</b> commands include:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
refresh-client -t/dev/ttyp2 
 
rename-session -tfirst newname 
 
set-window-option -t:0 monitor-activity on 
 
new-window ; split-window -d 
 
bind-key R source-file ~/.tmux.conf &#92;; &#92; 
	display-message &quot;source-file done&quot;</pre>
<p>
Or from <a class="link-man" href="/cgi-bin/man.cgi?query=sh&amp;sec=1">sh(1)</a>:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
$ tmux kill-window -t :1 
 
$ tmux new-window &#92;; split-window -d 
 
$ tmux new-session -d 'vi /etc/passwd' &#92;; split-window -d &#92;; attach</pre>
</div>
<div class="section">
<h1 id="x434c49454e545320414e442053455353494f4e53">CLIENTS AND SESSIONS</h1> The <b class="name">tmux</b> server manages clients, sessions, windows and panes. Clients are attached to sessions to interact with them, either when they are created with the <b class="cmd">new-session</b> command, or later with the <b class="cmd">attach-session</b> command. Each session has one or more windows <span class="emph">linked</span> into it. Windows may be linked to multiple sessions and are made up of one or more panes, each of which contains a pseudo terminal. Commands for creating, linking and otherwise manipulating windows are covered in the <i class="link-sec"><a class="link-sec" href="#x57494e444f575320414e442050414e4553">WINDOWS AND PANES</a></i> section.<p>
The following commands are available to manage clients and sessions:<dl style="margin-top: 0.00em;margin-bottom: 0.00em;" class="list list-tag">
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">attach-session</b> &#91;<span class="opt"><b class="flag">&#45;dr</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;c</b> <i class="arg">working-directory</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-session</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">attach</b>)</div>
</blockquote>
If run from outside <b class="name">tmux</b>, create a new client in the current terminal and attach it to <i class="arg">target-session</i>. If used from inside, switch the current client. If <b class="flag">&#45;d</b> is specified, any other clients attached to the session are detached. <b class="flag">&#45;r</b> signifies the client is read-only (only keys bound to the <b class="cmd">detach-client</b> or <b class="cmd">switch-client</b> commands have any effect)<p>
If no server is started, <b class="cmd">attach-session</b> will attempt to start it; this will fail unless sessions are created in the configuration file.<p>
The <i class="arg">target-session</i> rules for <b class="cmd">attach-session</b> are slightly adjusted: if <b class="name">tmux</b> needs to select the most recently used session, it will prefer the most recently used <span class="emph">unattached</span> session.<p>
<b class="flag">&#45;c</b> will set the session working directory (used for new windows) to <i class="arg">working-directory</i>.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">detach-client</b> &#91;<span class="opt"><b class="flag">&#45;P</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;a</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;s</b> <i class="arg">target-session</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-client</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">detach</b>)</div>
</blockquote>
Detach the current client if bound to a key, the client specified with <b class="flag">&#45;t</b>, or all clients currently attached to the session specified by <b class="flag">&#45;s</b>. The <b class="flag">&#45;a</b> option kills all but the client given with <b class="flag">&#45;t</b>. If <b class="flag">&#45;P</b> is given, send SIGHUP to the parent process of the client, typically causing it to exit.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">has-session</b> &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-session</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">has</b>)</div>
</blockquote>
Report an error and exit with 1 if the specified session does not exist. If it does exist, exit with 0.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">kill-server</b></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Kill the <b class="name">tmux</b> server and clients and destroy all sessions.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">kill-session</b> &#91;<span class="opt"><b class="flag">&#45;a</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-session</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Destroy the given session, closing any windows linked to it and no other sessions, and detaching all clients attached to it. If <b class="flag">&#45;a</b> is given, all sessions but the specified one is killed.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">list-clients</b> &#91;<span class="opt"><b class="flag">&#45;F</b> <i class="arg">format</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-session</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">lsc</b>)</div>
</blockquote>
List all clients attached to the server. For the meaning of the <b class="flag">&#45;F</b> flag, see the <i class="link-sec"><a class="link-sec" href="#x464f524d415453">FORMATS</a></i> section. If <i class="arg">target-session</i> is specified, list only clients connected to that session.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">list-commands</b></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">lscm</b>)</div>
</blockquote>
List the syntax of all commands supported by <b class="name">tmux</b>.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">list-sessions</b> &#91;<span class="opt"><b class="flag">&#45;F</b> <i class="arg">format</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">ls</b>)</div>
</blockquote>
List all sessions managed by the server. For the meaning of the <b class="flag">&#45;F</b> flag, see the <i class="link-sec"><a class="link-sec" href="#x464f524d415453">FORMATS</a></i> section.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">lock-client</b> &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-client</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">lockc</b>)</div>
</blockquote>
Lock <i class="arg">target-client</i>, see the <b class="cmd">lock-server</b> command.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">lock-session</b> &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-session</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">locks</b>)</div>
</blockquote>
Lock all clients attached to <i class="arg">target-session</i>.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">new-session</b> &#91;<span class="opt"><b class="flag">&#45;AdDP</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;c</b> <i class="arg">start-directory</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;F</b> <i class="arg">format</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;n</b> <i class="arg">window-name</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;s</b> <i class="arg">session-name</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-session</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;x</b> <i class="arg">width</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;y</b> <i class="arg">height</i></span>&#93; &#91;<span class="opt"><i class="arg">shell-command</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">new</b>)</div>
</blockquote>
Create a new session with name <i class="arg">session-name</i>.<p>
The new session is attached to the current terminal unless <b class="flag">&#45;d</b> is given. <i class="arg">window-name</i> and <i class="arg">shell-command</i> are the name of and shell command to execute in the initial window. If <b class="flag">&#45;d</b> is used, <b class="flag">&#45;x</b> and <b class="flag">&#45;y</b> specify the size of the initial window (80 by 24 if not given).<p>
If run from a terminal, any <a class="link-man" href="/cgi-bin/man.cgi?query=termios&amp;sec=4">termios(4)</a> special characters are saved and used for new windows in the new session.<p>
The <b class="flag">&#45;A</b> flag makes <b class="cmd">new-session</b> behave like <b class="cmd">attach-session</b> if <i class="arg">session-name</i> already exists; in the case, <b class="flag">&#45;D</b> behaves like <b class="flag">&#45;d</b> to <b class="cmd">attach-session</b>.<p>
If <b class="flag">&#45;t</b> is given, the new session is <span class="emph">grouped</span> with <i class="arg">target-session</i>. This means they share the same set of windows - all windows from <i class="arg">target-session</i> are linked to the new session and any subsequent new windows or windows being closed are applied to both sessions. The current and previous window and any session options remain independent and either session may be killed without affecting the other. Giving <b class="flag">&#45;n</b> or <i class="arg">shell-command</i> are invalid if <b class="flag">&#45;t</b> is used.<p>
The <b class="flag">&#45;P</b> option prints information about the new session after it has been created. By default, it uses the format &#8216;<code class="lit">#{session_name}:</code>&#8217; but a different format may be specified with <b class="flag">&#45;F</b>.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">refresh-client</b> &#91;<span class="opt"><b class="flag">&#45;S</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-client</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">refresh</b>)</div>
</blockquote>
Refresh the current client if bound to a key, or a single client if one is given with <b class="flag">&#45;t</b>. If <b class="flag">&#45;S</b> is specified, only update the client's status bar.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">rename-session</b> &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-session</i></span>&#93; <i class="arg">new-name</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">rename</b>)</div>
</blockquote>
Rename the session to <i class="arg">new-name</i>.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">show-messages</b> &#91;<span class="opt"><b class="flag">&#45;IJT</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-client</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">showmsgs</b>)</div>
</blockquote>
Show client messages or server information. Any messages displayed on the status line are saved in a per-client message log, up to a maximum of the limit set by the <i class="arg">message-limit</i> server option. With <b class="flag">&#45;t</b>, display the log for <i class="arg">target-client</i>. <b class="flag">&#45;I</b>, <b class="flag">&#45;J</b> and <b class="flag">&#45;T</b> show debugging information about the running server, jobs and terminals.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">source-file</b> <i class="arg">path</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">source</b>)</div>
</blockquote>
Execute commands from <i class="arg">path</i>.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">start-server</b></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">start</b>)</div>
</blockquote>
Start the <b class="name">tmux</b> server, if not already running, without creating any sessions.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">suspend-client</b> &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-client</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">suspendc</b>)</div>
</blockquote>
Suspend a client by sending <span class="define">SIGTSTP</span> (tty stop).</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">switch-client</b> &#91;<span class="opt"><b class="flag">&#45;lnpr</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;c</b> <i class="arg">target-client</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-session</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">switchc</b>)</div>
</blockquote>
Switch the current session for client <i class="arg">target-client</i> to <i class="arg">target-session</i>. If <b class="flag">&#45;l</b>, <b class="flag">&#45;n</b> or <b class="flag">&#45;p</b> is used, the client is moved to the last, next or previous session respectively. <b class="flag">&#45;r</b> toggles whether a client is read-only (see the <b class="cmd">attach-session</b> command).</dd>
</dl>
</div>
<div class="section">
<h1 id="x57494e444f575320414e442050414e4553">WINDOWS AND PANES</h1> A <b class="name">tmux</b> window may be in one of several modes. The default permits direct access to the terminal attached to the window. The other is copy mode, which permits a section of a window or its history to be copied to a <span class="emph">paste buffer</span> for later insertion into another window. This mode is entered with the <b class="cmd">copy-mode</b> command, bound to &#8216;<code class="lit">[</code>&#8217; by default. It is also entered when a command that produces output, such as <b class="cmd">list-keys</b>, is executed from a key binding.<p>
The keys available depend on whether emacs or vi mode is selected (see the <b class="cmd">mode-keys</b> option). The following keys are supported as appropriate for the mode:<table style="margin-top: 0.00em;margin-bottom: 0.00em;margin-left: 5.00ex;" class="list list-col">
<col style="width: 1.04ex;">
<col style="width: 0.50ex;">
<col style="min-width: 0.21ex;">
<tbody>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<span class="symb">Function</span></td>
<td class="list-col" style="margin-top: 1.00em;">
<span class="symb">vi</span></td>
<td class="list-col" style="margin-top: 1.00em;">
<span class="symb">emacs</span></td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Append selection</code></td>
<td class="list-col" style="margin-top: 1.00em;">
A</td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Back to indentation</code></td>
<td class="list-col" style="margin-top: 1.00em;">
^</td>
<td class="list-col" style="margin-top: 1.00em;">
M-m</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Copy to named buffer</code></td>
<td class="list-col" style="margin-top: 1.00em;">
&quot;</td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Bottom of history</code></td>
<td class="list-col" style="margin-top: 1.00em;">
G</td>
<td class="list-col" style="margin-top: 1.00em;">
M-&lt;</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Clear selection</code></td>
<td class="list-col" style="margin-top: 1.00em;">
Escape</td>
<td class="list-col" style="margin-top: 1.00em;">
C-g</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Copy selection</code></td>
<td class="list-col" style="margin-top: 1.00em;">
Enter</td>
<td class="list-col" style="margin-top: 1.00em;">
M-w</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Cursor down</code></td>
<td class="list-col" style="margin-top: 1.00em;">
j</td>
<td class="list-col" style="margin-top: 1.00em;">
Down</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Cursor left</code></td>
<td class="list-col" style="margin-top: 1.00em;">
h</td>
<td class="list-col" style="margin-top: 1.00em;">
Left</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Cursor right</code></td>
<td class="list-col" style="margin-top: 1.00em;">
l</td>
<td class="list-col" style="margin-top: 1.00em;">
Right</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Cursor to bottom line</code></td>
<td class="list-col" style="margin-top: 1.00em;">
L</td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Cursor to middle line</code></td>
<td class="list-col" style="margin-top: 1.00em;">
M</td>
<td class="list-col" style="margin-top: 1.00em;">
M-r</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Cursor to top line</code></td>
<td class="list-col" style="margin-top: 1.00em;">
H</td>
<td class="list-col" style="margin-top: 1.00em;">
M-R</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Cursor up</code></td>
<td class="list-col" style="margin-top: 1.00em;">
k</td>
<td class="list-col" style="margin-top: 1.00em;">
Up</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Delete entire line</code></td>
<td class="list-col" style="margin-top: 1.00em;">
d</td>
<td class="list-col" style="margin-top: 1.00em;">
C-u</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Delete/Copy to end of line</code></td>
<td class="list-col" style="margin-top: 1.00em;">
D</td>
<td class="list-col" style="margin-top: 1.00em;">
C-k</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">End of line</code></td>
<td class="list-col" style="margin-top: 1.00em;">
$</td>
<td class="list-col" style="margin-top: 1.00em;">
C-e</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Go to line</code></td>
<td class="list-col" style="margin-top: 1.00em;">
:</td>
<td class="list-col" style="margin-top: 1.00em;">
g</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Half page down</code></td>
<td class="list-col" style="margin-top: 1.00em;">
C-d</td>
<td class="list-col" style="margin-top: 1.00em;">
M-Down</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Half page up</code></td>
<td class="list-col" style="margin-top: 1.00em;">
C-u</td>
<td class="list-col" style="margin-top: 1.00em;">
M-Up</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Jump forward</code></td>
<td class="list-col" style="margin-top: 1.00em;">
f</td>
<td class="list-col" style="margin-top: 1.00em;">
f</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Jump to forward</code></td>
<td class="list-col" style="margin-top: 1.00em;">
t</td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Jump backward</code></td>
<td class="list-col" style="margin-top: 1.00em;">
F</td>
<td class="list-col" style="margin-top: 1.00em;">
F</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Jump to backward</code></td>
<td class="list-col" style="margin-top: 1.00em;">
T</td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Jump again</code></td>
<td class="list-col" style="margin-top: 1.00em;">
;</td>
<td class="list-col" style="margin-top: 1.00em;">
;</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Jump again in reverse</code></td>
<td class="list-col" style="margin-top: 1.00em;">
,</td>
<td class="list-col" style="margin-top: 1.00em;">
,</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Next page</code></td>
<td class="list-col" style="margin-top: 1.00em;">
C-f</td>
<td class="list-col" style="margin-top: 1.00em;">
Page down</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Next space</code></td>
<td class="list-col" style="margin-top: 1.00em;">
W</td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Next space, end of word</code></td>
<td class="list-col" style="margin-top: 1.00em;">
E</td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Next word</code></td>
<td class="list-col" style="margin-top: 1.00em;">
w</td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Next word end</code></td>
<td class="list-col" style="margin-top: 1.00em;">
e</td>
<td class="list-col" style="margin-top: 1.00em;">
M-f</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Other end of selection</code></td>
<td class="list-col" style="margin-top: 1.00em;">
o</td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Paste buffer</code></td>
<td class="list-col" style="margin-top: 1.00em;">
p</td>
<td class="list-col" style="margin-top: 1.00em;">
C-y</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Previous page</code></td>
<td class="list-col" style="margin-top: 1.00em;">
C-b</td>
<td class="list-col" style="margin-top: 1.00em;">
Page up</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Previous word</code></td>
<td class="list-col" style="margin-top: 1.00em;">
b</td>
<td class="list-col" style="margin-top: 1.00em;">
M-b</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Previous space</code></td>
<td class="list-col" style="margin-top: 1.00em;">
B</td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Quit mode</code></td>
<td class="list-col" style="margin-top: 1.00em;">
q</td>
<td class="list-col" style="margin-top: 1.00em;">
Escape</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Rectangle toggle</code></td>
<td class="list-col" style="margin-top: 1.00em;">
v</td>
<td class="list-col" style="margin-top: 1.00em;">
R</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Scroll down</code></td>
<td class="list-col" style="margin-top: 1.00em;">
C-Down or C-e</td>
<td class="list-col" style="margin-top: 1.00em;">
C-Down</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Scroll up</code></td>
<td class="list-col" style="margin-top: 1.00em;">
C-Up or C-y</td>
<td class="list-col" style="margin-top: 1.00em;">
C-Up</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Search again</code></td>
<td class="list-col" style="margin-top: 1.00em;">
n</td>
<td class="list-col" style="margin-top: 1.00em;">
n</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Search again in reverse</code></td>
<td class="list-col" style="margin-top: 1.00em;">
N</td>
<td class="list-col" style="margin-top: 1.00em;">
N</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Search backward</code></td>
<td class="list-col" style="margin-top: 1.00em;">
?</td>
<td class="list-col" style="margin-top: 1.00em;">
C-r</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Search forward</code></td>
<td class="list-col" style="margin-top: 1.00em;">
/</td>
<td class="list-col" style="margin-top: 1.00em;">
C-s</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Start of line</code></td>
<td class="list-col" style="margin-top: 1.00em;">
0</td>
<td class="list-col" style="margin-top: 1.00em;">
C-a</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Start selection</code></td>
<td class="list-col" style="margin-top: 1.00em;">
Space</td>
<td class="list-col" style="margin-top: 1.00em;">
C-Space</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Top of history</code></td>
<td class="list-col" style="margin-top: 1.00em;">
g</td>
<td class="list-col" style="margin-top: 1.00em;">
M-&gt;</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Transpose characters</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
C-t</td>
</tr>
</tbody>
</table>
<p>
The next and previous word keys use space and the &#8216;<code class="lit">-</code>&#8217;, &#8216;<code class="lit">_</code>&#8217; and &#8216;<code class="lit">@</code>&#8217; characters as word delimiters by default, but this can be adjusted by setting the <span class="emph">word-separators</span> session option. Next word moves to the start of the next word, next word end to the end of the next word and previous word to the start of the previous word. The three next and previous space keys work similarly but use a space alone as the word separator.<p>
The jump commands enable quick movement within a line. For instance, typing &#8216;<code class="lit">f</code>&#8217; followed by &#8216;<code class="lit">/</code>&#8217; will move the cursor to the next &#8216;<code class="lit">/</code>&#8217; character on the current line. A &#8216;<code class="lit">;</code>&#8217; will then jump to the next occurrence.<p>
Commands in copy mode may be prefaced by an optional repeat count. With vi key bindings, a prefix is entered using the number keys; with emacs, the Alt (meta) key and a number begins prefix entry. For example, to move the cursor forward by ten words, use &#8216;<code class="lit">M-1 0 M-f</code>&#8217; in emacs mode, and &#8216;<code class="lit">10w</code>&#8217; in vi.<p>
Mode key bindings are defined in a set of named tables: <span class="emph">vi-edit</span> and <span class="emph">emacs-edit</span> for keys used when line editing at the command prompt; <span class="emph">vi-choice</span> and <span class="emph">emacs-choice</span> for keys used when choosing from lists (such as produced by the <b class="cmd">choose-window</b> command); and <span class="emph">vi-copy</span> and <span class="emph">emacs-copy</span> used in copy mode. The tables may be viewed with the <b class="cmd">list-keys</b> command and keys modified or removed with <b class="cmd">bind-key</b> and <b class="cmd">unbind-key</b>. One command accepts an argument, <b class="cmd">copy-pipe</b>, which copies the selection and pipes it to a command. For example the following will bind &#8216;<code class="lit">C-q</code>&#8217; to copy the selection into <i class="file">/tmp</i> as well as the paste buffer:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
bind-key -temacs-copy C-q copy-pipe &quot;cat &gt;/tmp/out&quot;</pre>
<p>
The paste buffer key pastes the first line from the top paste buffer on the stack.<p>
The synopsis for the <b class="cmd">copy-mode</b> command is:<dl style="margin-top: 0.00em;margin-bottom: 0.00em;" class="list list-tag">
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">copy-mode</b> &#91;<span class="opt"><b class="flag">&#45;u</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-pane</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Enter copy mode. The <b class="flag">&#45;u</b> option scrolls one page up.</dd>
</dl>
<p>
Each window displayed by <b class="name">tmux</b> may be split into one or more <span class="emph">panes</span>; each pane takes up a certain area of the display and is a separate terminal. A window may be split into panes using the <b class="cmd">split-window</b> command. Windows may be split horizontally (with the <b class="flag">&#45;h</b> flag) or vertically. Panes may be resized with the <b class="cmd">resize-pane</b> command (bound to &#8216;<code class="lit">C-up</code>&#8217;, &#8216;<code class="lit">C-down</code>&#8217; &#8216;<code class="lit">C-left</code>&#8217; and &#8216;<code class="lit">C-right</code>&#8217; by default), the current pane may be changed with the <b class="cmd">select-pane</b> command and the <b class="cmd">rotate-window</b> and <b class="cmd">swap-pane</b> commands may be used to swap panes without changing their position. Panes are numbered beginning from zero in the order they are created.<p>
A number of preset <span class="emph">layouts</span> are available. These may be selected with the <b class="cmd">select-layout</b> command or cycled with <b class="cmd">next-layout</b> (bound to &#8216;<code class="lit">Space</code>&#8217; by default); once a layout is chosen, panes within it may be moved and resized as normal.<p>
The following layouts are supported:<dl style="margin-top: 0.00em;margin-bottom: 0.00em;" class="list list-tag">
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">even-horizontal</b></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Panes are spread out evenly from left to right across the window.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">even-vertical</b></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Panes are spread evenly from top to bottom.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">main-horizontal</b></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
A large (main) pane is shown at the top of the window and the remaining panes are spread from left to right in the leftover space at the bottom. Use the <span class="emph">main-pane-height</span> window option to specify the height of the top pane.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">main-vertical</b></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Similar to <b class="cmd">main-horizontal</b> but the large pane is placed on the left and the others spread from top to bottom along the right. See the <span class="emph">main-pane-width</span> window option.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">tiled</b></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Panes are spread out as evenly as possible over the window in both rows and columns.</dd>
</dl>
<p>
In addition, <b class="cmd">select-layout</b> may be used to apply a previously used layout - the <b class="cmd">list-windows</b> command displays the layout of each window in a form suitable for use with <b class="cmd">select-layout</b>. For example:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
$ tmux list-windows 
0: ksh [159x48] 
    layout: bb62,159x48,0,0{79x48,0,0,79x48,80,0} 
$ tmux select-layout bb62,159x48,0,0{79x48,0,0,79x48,80,0}</pre>
<p>
<b class="name">tmux</b> automatically adjusts the size of the layout for the current window size. Note that a layout cannot be applied to a window with more panes than that from which the layout was originally defined.<p>
Commands related to windows and panes are as follows:<dl style="margin-top: 0.00em;margin-bottom: 0.00em;" class="list list-tag">
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">break-pane</b> &#91;<span class="opt"><b class="flag">&#45;dP</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;F</b> <i class="arg">format</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-pane</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">breakp</b>)</div>
</blockquote>
Break <i class="arg">target-pane</i> off from its containing window to make it the only pane in a new window. If <b class="flag">&#45;d</b> is given, the new window does not become the current window. The <b class="flag">&#45;P</b> option prints information about the new window after it has been created. By default, it uses the format &#8216;<code class="lit">#{session_name}:#{window_index}</code>&#8217; but a different format may be specified with <b class="flag">&#45;F</b>.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">capture-pane</b> &#91;<span class="opt"><b class="flag">&#45;aepPq</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;b</b> <i class="arg">buffer-name</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;E</b> <i class="arg">end-line</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;S</b> <i class="arg">start-line</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-pane</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">capturep</b>)</div>
</blockquote>
Capture the contents of a pane. If <b class="flag">&#45;p</b> is given, the output goes to stdout, otherwise to the buffer specified with <b class="flag">&#45;b</b> or a new buffer if omitted. If <b class="flag">&#45;a</b> is given, the alternate screen is used, and the history is not accessible. If no alternate screen exists, an error will be returned unless <b class="flag">&#45;q</b> is given. If <b class="flag">&#45;e</b> is given, the output includes escape sequences for text and background attributes. <b class="flag">&#45;C</b> also escapes non-printable characters as octal &#92;xxx. <b class="flag">&#45;J</b> joins wrapped lines and preserves trailing spaces at each line's end. <b class="flag">&#45;P</b> captures only any output that the pane has received that is the beginning of an as-yet incomplete escape sequence.<p>
<b class="flag">&#45;S</b> and <b class="flag">&#45;E</b> specify the starting and ending line numbers, zero is the first line of the visible pane and negative numbers are lines in the history. &#8216;<code class="lit">-</code>&#8217; to <b class="flag">&#45;S</b> is the start of the history and to <b class="flag">&#45;E</b> the end of the visible pane. The default is to capture only the visible contents of the pane.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">choose-client</b> &#91;<span class="opt"><b class="flag">&#45;F</b> <i class="arg">format</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-window</i></span>&#93; &#91;<span class="opt"><i class="arg">template</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Put a window into client choice mode, allowing a client to be selected interactively from a list. After a client is chosen, &#8216;<code class="lit">%%</code>&#8217; is replaced by the client <a class="link-man" href="/cgi-bin/man.cgi?query=pty&amp;sec=4">pty(4)</a> path in <i class="arg">template</i> and the result executed as a command. If <i class="arg">template</i> is not given, &quot;detach-client -t '%%'&quot; is used. For the meaning of the <b class="flag">&#45;F</b> flag, see the <i class="link-sec"><a class="link-sec" href="#x464f524d415453">FORMATS</a></i> section. This command works only if at least one client is attached.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">choose-session</b> &#91;<span class="opt"><b class="flag">&#45;F</b> <i class="arg">format</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-window</i></span>&#93; &#91;<span class="opt"><i class="arg">template</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Put a window into session choice mode, where a session may be selected interactively from a list. When one is chosen, &#8216;<code class="lit">%%</code>&#8217; is replaced by the session name in <i class="arg">template</i> and the result executed as a command. If <i class="arg">template</i> is not given, &quot;switch-client -t '%%'&quot; is used. For the meaning of the <b class="flag">&#45;F</b> flag, see the <i class="link-sec"><a class="link-sec" href="#x464f524d415453">FORMATS</a></i> section. This command works only if at least one client is attached.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">choose-tree</b> &#91;<span class="opt"><b class="flag">&#45;suw</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;b</b> <i class="arg">session-template</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;c</b> <i class="arg">window-template</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;S</b> <i class="arg">format</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;W</b> <i class="arg">format</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-window</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Put a window into tree choice mode, where either sessions or windows may be selected interactively from a list. By default, windows belonging to a session are indented to show their relationship to a session.<p>
Note that the <b class="cmd">choose-window</b> and <b class="cmd">choose-session</b> commands are wrappers around <b class="cmd">choose-tree</b>.<p>
If <b class="flag">&#45;s</b> is given, will show sessions. If <b class="flag">&#45;w</b> is given, will show windows.<p>
By default, the tree is collapsed and sessions must be expanded to windows with the right arrow key. The <b class="flag">&#45;u</b> option will start with all sessions expanded instead.<p>
If <b class="flag">&#45;b</b> is given, will override the default session command. Note that &#8216;<code class="lit">%%</code>&#8217; can be used and will be replaced with the session name. The default option if not specified is &quot;switch-client -t '%%'&quot;. If <b class="flag">&#45;c</b> is given, will override the default window command. Like <b class="flag">&#45;b</b>, &#8216;<code class="lit">%%</code>&#8217; can be used and will be replaced with the session name and window index. When a window is chosen from the list, the session command is run before the window command.<p>
If <b class="flag">&#45;S</b> is given will display the specified format instead of the default session format. If <b class="flag">&#45;W</b> is given will display the specified format instead of the default window format. For the meaning of the <b class="flag">&#45;s</b> and <b class="flag">&#45;w</b> options, see the <i class="link-sec"><a class="link-sec" href="#x464f524d415453">FORMATS</a></i> section.<p>
This command works only if at least one client is attached.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">choose-window</b> &#91;<span class="opt"><b class="flag">&#45;F</b> <i class="arg">format</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-window</i></span>&#93; &#91;<span class="opt"><i class="arg">template</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Put a window into window choice mode, where a window may be chosen interactively from a list. After a window is selected, &#8216;<code class="lit">%%</code>&#8217; is replaced by the session name and window index in <i class="arg">template</i> and the result executed as a command. If <i class="arg">template</i> is not given, &quot;select-window -t '%%'&quot; is used. For the meaning of the <b class="flag">&#45;F</b> flag, see the <i class="link-sec"><a class="link-sec" href="#x464f524d415453">FORMATS</a></i> section. This command works only if at least one client is attached.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">display-panes</b> &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-client</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">displayp</b>)</div>
</blockquote>
Display a visible indicator of each pane shown by <i class="arg">target-client</i>. See the <b class="cmd">display-panes-time</b>, <b class="cmd">display-panes-colour</b>, and <b class="cmd">display-panes-active-colour</b> session options. While the indicator is on screen, a pane may be selected with the &#8216;<code class="lit">0</code>&#8217; to &#8216;<code class="lit">9</code>&#8217; keys.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">find-window</b> &#91;<span class="opt"><b class="flag">&#45;CNT</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;F</b> <i class="arg">format</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-window</i></span>&#93; <i class="arg">match-string</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">findw</b>)</div>
</blockquote>
Search for the <a class="link-man" href="/cgi-bin/man.cgi?query=fnmatch&amp;sec=3">fnmatch(3)</a> pattern <i class="arg">match-string</i> in window names, titles, and visible content (but not history). The flags control matching behavior: <b class="flag">&#45;C</b> matches only visible window contents, <b class="flag">&#45;N</b> matches only the window name and <b class="flag">&#45;T</b> matches only the window title. The default is <b class="flag">&#45;CNT</b>. If only one window is matched, it'll be automatically selected, otherwise a choice list is shown. For the meaning of the <b class="flag">&#45;F</b> flag, see the <i class="link-sec"><a class="link-sec" href="#x464f524d415453">FORMATS</a></i> section. This command works only if at least one client is attached.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">join-pane</b> &#91;<span class="opt"><b class="flag">&#45;bdhv</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;l</b> <i class="arg">size</i> | <b class="flag">&#45;p</b> <i class="arg">percentage</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;s</b> <i class="arg">src-pane</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">dst-pane</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">joinp</b>)</div>
</blockquote>
Like <b class="cmd">split-window</b>, but instead of splitting <i class="arg">dst-pane</i> and creating a new pane, split it and move <i class="arg">src-pane</i> into the space. This can be used to reverse <b class="cmd">break-pane</b>. The <b class="flag">&#45;b</b> option causes <i class="arg">src-pane</i> to be joined to left of or above <i class="arg">dst-pane</i>.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">kill-pane</b> &#91;<span class="opt"><b class="flag">&#45;a</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-pane</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">killp</b>)</div>
</blockquote>
Destroy the given pane. If no panes remain in the containing window, it is also destroyed. The <b class="flag">&#45;a</b> option kills all but the pane given with <b class="flag">&#45;t</b>.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">kill-window</b> &#91;<span class="opt"><b class="flag">&#45;a</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-window</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">killw</b>)</div>
</blockquote>
Kill the current window or the window at <i class="arg">target-window</i>, removing it from any sessions to which it is linked. The <b class="flag">&#45;a</b> option kills all but the window given with <b class="flag">&#45;t</b>.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">last-pane</b> &#91;<span class="opt"><b class="flag">&#45;de</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-window</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">lastp</b>)</div>
</blockquote>
Select the last (previously selected) pane. <b class="flag">&#45;e</b> enables or <b class="flag">&#45;d</b> disables input to the pane.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">last-window</b> &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-session</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">last</b>)</div>
</blockquote>
Select the last (previously selected) window. If no <i class="arg">target-session</i> is specified, select the last window of the current session.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">link-window</b> &#91;<span class="opt"><b class="flag">&#45;dk</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;s</b> <i class="arg">src-window</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">dst-window</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">linkw</b>)</div>
</blockquote>
Link the window at <i class="arg">src-window</i> to the specified <i class="arg">dst-window</i>. If <i class="arg">dst-window</i> is specified and no such window exists, the <i class="arg">src-window</i> is linked there. If <b class="flag">&#45;k</b> is given and <i class="arg">dst-window</i> exists, it is killed, otherwise an error is generated. If <b class="flag">&#45;d</b> is given, the newly linked window is not selected.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">list-panes</b> &#91;<span class="opt"><b class="flag">&#45;as</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;F</b> <i class="arg">format</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">lsp</b>)</div>
</blockquote>
If <b class="flag">&#45;a</b> is given, <i class="arg">target</i> is ignored and all panes on the server are listed. If <b class="flag">&#45;s</b> is given, <i class="arg">target</i> is a session (or the current session). If neither is given, <i class="arg">target</i> is a window (or the current window). For the meaning of the <b class="flag">&#45;F</b> flag, see the <i class="link-sec"><a class="link-sec" href="#x464f524d415453">FORMATS</a></i> section.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">list-windows</b> &#91;<span class="opt"><b class="flag">&#45;a</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;F</b> <i class="arg">format</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-session</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">lsw</b>)</div>
</blockquote>
If <b class="flag">&#45;a</b> is given, list all windows on the server. Otherwise, list windows in the current session or in <i class="arg">target-session</i>. For the meaning of the <b class="flag">&#45;F</b> flag, see the <i class="link-sec"><a class="link-sec" href="#x464f524d415453">FORMATS</a></i> section.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">move-pane</b> &#91;<span class="opt"><b class="flag">&#45;bdhv</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;l</b> <i class="arg">size</i> | <b class="flag">&#45;p</b> <i class="arg">percentage</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;s</b> <i class="arg">src-pane</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">dst-pane</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">movep</b>)</div>
</blockquote>
Like <b class="cmd">join-pane</b>, but <i class="arg">src-pane</i> and <i class="arg">dst-pane</i> may belong to the same window.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">move-window</b> &#91;<span class="opt"><b class="flag">&#45;rdk</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;s</b> <i class="arg">src-window</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">dst-window</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">movew</b>)</div>
</blockquote>
This is similar to <b class="cmd">link-window</b>, except the window at <i class="arg">src-window</i> is moved to <i class="arg">dst-window</i>. With <b class="flag">&#45;r</b>, all windows in the session are renumbered in sequential order, respecting the <b class="cmd">base-index</b> option.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">new-window</b> &#91;<span class="opt"><b class="flag">&#45;adkP</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;c</b> <i class="arg">start-directory</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;F</b> <i class="arg">format</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;n</b> <i class="arg">window-name</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-window</i></span>&#93; &#91;<span class="opt"><i class="arg">shell-command</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">neww</b>)</div>
</blockquote>
Create a new window. With <b class="flag">&#45;a</b>, the new window is inserted at the next index up from the specified <i class="arg">target-window</i>, moving windows up if necessary, otherwise <i class="arg">target-window</i> is the new window location.<p>
If <b class="flag">&#45;d</b> is given, the session does not make the new window the current window. <i class="arg">target-window</i> represents the window to be created; if the target already exists an error is shown, unless the <b class="flag">&#45;k</b> flag is used, in which case it is destroyed. <i class="arg">shell-command</i> is the command to execute. If <i class="arg">shell-command</i> is not specified, the value of the <b class="cmd">default-command</b> option is used. <b class="flag">&#45;c</b> specifies the working directory in which the new window is created.<p>
When the shell command completes, the window closes. See the <b class="cmd">remain-on-exit</b> option to change this behaviour.<p>
The <span class="env">TERM</span> environment variable must be set to &#8220;screen&#8221; for all programs running <span class="emph">inside</span> <b class="name">tmux</b>. New windows will automatically have &#8220;TERM=screen&#8221; added to their environment, but care must be taken not to reset this in shell start-up files.<p>
The <b class="flag">&#45;P</b> option prints information about the new window after it has been created. By default, it uses the format &#8216;<code class="lit">#{session_name}:#{window_index}</code>&#8217; but a different format may be specified with <b class="flag">&#45;F</b>.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">next-layout</b> &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-window</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">nextl</b>)</div>
</blockquote>
Move a window to the next layout and rearrange the panes to fit.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">next-window</b> &#91;<span class="opt"><b class="flag">&#45;a</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-session</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">next</b>)</div>
</blockquote>
Move to the next window in the session. If <b class="flag">&#45;a</b> is used, move to the next window with an alert.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">pipe-pane</b> &#91;<span class="opt"><b class="flag">&#45;o</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-pane</i></span>&#93; &#91;<span class="opt"><i class="arg">shell-command</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">pipep</b>)</div>
</blockquote>
Pipe any output sent by the program in <i class="arg">target-pane</i> to a shell command. A pane may only be piped to one command at a time, any existing pipe is closed before <i class="arg">shell-command</i> is executed. The <i class="arg">shell-command</i> string may contain the special character sequences supported by the <b class="cmd">status-left</b> option. If no <i class="arg">shell-command</i> is given, the current pipe (if any) is closed.<p>
The <b class="flag">&#45;o</b> option only opens a new pipe if no previous pipe exists, allowing a pipe to be toggled with a single key, for example:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
bind-key C-p pipe-pane -o 'cat &gt;&gt;~/output.#I-#P'</pre>
</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">previous-layout</b> &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-window</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">prevl</b>)</div>
</blockquote>
Move to the previous layout in the session.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">previous-window</b> &#91;<span class="opt"><b class="flag">&#45;a</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-session</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">prev</b>)</div>
</blockquote>
Move to the previous window in the session. With <b class="flag">&#45;a</b>, move to the previous window with an alert.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">rename-window</b> &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-window</i></span>&#93; <i class="arg">new-name</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">renamew</b>)</div>
</blockquote>
Rename the current window, or the window at <i class="arg">target-window</i> if specified, to <i class="arg">new-name</i>.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">resize-pane</b> &#91;<span class="opt"><b class="flag">&#45;DLRUZ</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-pane</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;x</b> <i class="arg">width</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;y</b> <i class="arg">height</i></span>&#93; &#91;<span class="opt"><i class="arg">adjustment</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">resizep</b>)</div>
</blockquote>
Resize a pane, up, down, left or right by <i class="arg">adjustment</i> with <b class="flag">&#45;U</b>, <b class="flag">&#45;D</b>, <b class="flag">&#45;L</b> or <b class="flag">&#45;R</b>, or to an absolute size with <b class="flag">&#45;x</b> or <b class="flag">&#45;y</b>. The <i class="arg">adjustment</i> is given in lines or cells (the default is 1).<p>
With <b class="flag">&#45;Z</b>, the active pane is toggled between zoomed (occupying the whole of the window) and unzoomed (its normal position in the layout).</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">respawn-pane</b> &#91;<span class="opt"><b class="flag">&#45;k</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-pane</i></span>&#93; &#91;<span class="opt"><i class="arg">shell-command</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">respawnp</b>)</div>
</blockquote>
Reactivate a pane in which the command has exited (see the <b class="cmd">remain-on-exit</b> window option). If <i class="arg">shell-command</i> is not given, the command used when the pane was created is executed. The pane must be already inactive, unless <b class="flag">&#45;k</b> is given, in which case any existing command is killed.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">respawn-window</b> &#91;<span class="opt"><b class="flag">&#45;k</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-window</i></span>&#93; &#91;<span class="opt"><i class="arg">shell-command</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">respawnw</b>)</div>
</blockquote>
Reactivate a window in which the command has exited (see the <b class="cmd">remain-on-exit</b> window option). If <i class="arg">shell-command</i> is not given, the command used when the window was created is executed. The window must be already inactive, unless <b class="flag">&#45;k</b> is given, in which case any existing command is killed.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">rotate-window</b> &#91;<span class="opt"><b class="flag">&#45;DU</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-window</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">rotatew</b>)</div>
</blockquote>
Rotate the positions of the panes within a window, either upward (numerically lower) with <b class="flag">&#45;U</b> or downward (numerically higher).</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">select-layout</b> &#91;<span class="opt"><b class="flag">&#45;np</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-window</i></span>&#93; &#91;<span class="opt"><i class="arg">layout-name</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">selectl</b>)</div>
</blockquote>
Choose a specific layout for a window. If <i class="arg">layout-name</i> is not given, the last preset layout used (if any) is reapplied. <b class="flag">&#45;n</b> and <b class="flag">&#45;p</b> are equivalent to the <b class="cmd">next-layout</b> and <b class="cmd">previous-layout</b> commands.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">select-pane</b> &#91;<span class="opt"><b class="flag">&#45;DdeLlRU</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-pane</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">selectp</b>)</div>
</blockquote>
Make pane <i class="arg">target-pane</i> the active pane in window <i class="arg">target-window</i>. If one of <b class="flag">&#45;D</b>, <b class="flag">&#45;L</b>, <b class="flag">&#45;R</b>, or <b class="flag">&#45;U</b> is used, respectively the pane below, to the left, to the right, or above the target pane is used. <b class="flag">&#45;l</b> is the same as using the <b class="cmd">last-pane</b> command. <b class="flag">&#45;e</b> enables or <b class="flag">&#45;d</b> disables input to the pane.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">select-window</b> &#91;<span class="opt"><b class="flag">&#45;lnpT</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-window</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">selectw</b>)</div>
</blockquote>
Select the window at <i class="arg">target-window</i>. <b class="flag">&#45;l</b>, <b class="flag">&#45;n</b> and <b class="flag">&#45;p</b> are equivalent to the <b class="cmd">last-window</b>, <b class="cmd">next-window</b> and <b class="cmd">previous-window</b> commands. If <b class="flag">&#45;T</b> is given and the selected window is already the current window, the command behaves like <b class="cmd">last-window</b>.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">split-window</b> &#91;<span class="opt"><b class="flag">&#45;dhvP</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;c</b> <i class="arg">start-directory</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;l</b> <i class="arg">size</i> | <b class="flag">&#45;p</b> <i class="arg">percentage</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-pane</i></span>&#93; &#91;<span class="opt"><i class="arg">shell-command</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;F</b> <i class="arg">format</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">splitw</b>)</div>
</blockquote>
Create a new pane by splitting <i class="arg">target-pane</i>: <b class="flag">&#45;h</b> does a horizontal split and <b class="flag">&#45;v</b> a vertical split; if neither is specified, <b class="flag">&#45;v</b> is assumed. The <b class="flag">&#45;l</b> and <b class="flag">&#45;p</b> options specify the size of the new pane in lines (for vertical split) or in cells (for horizontal split), or as a percentage, respectively. All other options have the same meaning as for the <b class="cmd">new-window</b> command.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">swap-pane</b> &#91;<span class="opt"><b class="flag">&#45;dDU</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;s</b> <i class="arg">src-pane</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">dst-pane</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">swapp</b>)</div>
</blockquote>
Swap two panes. If <b class="flag">&#45;U</b> is used and no source pane is specified with <b class="flag">&#45;s</b>, <i class="arg">dst-pane</i> is swapped with the previous pane (before it numerically); <b class="flag">&#45;D</b> swaps with the next pane (after it numerically). <b class="flag">&#45;d</b> instructs <b class="name">tmux</b> not to change the active pane.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">swap-window</b> &#91;<span class="opt"><b class="flag">&#45;d</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;s</b> <i class="arg">src-window</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">dst-window</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">swapw</b>)</div>
</blockquote>
This is similar to <b class="cmd">link-window</b>, except the source and destination windows are swapped. It is an error if no window exists at <i class="arg">src-window</i>.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">unlink-window</b> &#91;<span class="opt"><b class="flag">&#45;k</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-window</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">unlinkw</b>)</div>
</blockquote>
Unlink <i class="arg">target-window</i>. Unless <b class="flag">&#45;k</b> is given, a window may be unlinked only if it is linked to multiple sessions - windows may not be linked to no sessions; if <b class="flag">&#45;k</b> is specified and the window is linked to only one session, it is unlinked and destroyed.</dd>
</dl>
</div>
<div class="section">
<h1 id="x4b45592042494e44494e4753">KEY BINDINGS</h1> <b class="name">tmux</b> allows a command to be bound to most keys, with or without a prefix key. When specifying keys, most represent themselves (for example &#8216;<code class="lit">A</code>&#8217; to &#8216;<code class="lit">Z</code>&#8217;). Ctrl keys may be prefixed with &#8216;<code class="lit">C-</code>&#8217; or &#8216;<code class="lit">^</code>&#8217;, and Alt (meta) with &#8216;<code class="lit">M-</code>&#8217;. In addition, the following special key names are accepted: <span class="emph">Up</span>, <span class="emph">Down</span>, <span class="emph">Left</span>, <span class="emph">Right</span>, <span class="emph">BSpace</span>, <span class="emph">BTab</span>, <span class="emph">DC</span> (Delete), <span class="emph">End</span>, <span class="emph">Enter</span>, <span class="emph">Escape</span>, <span class="emph">F1</span> to <span class="emph">F20</span>, <span class="emph">Home</span>, <span class="emph">IC</span> (Insert), <span class="emph">NPage/PageDown/PgDn</span>, <span class="emph">PPage/PageUp/PgUp</span>, <span class="emph">Space</span>, and <span class="emph">Tab</span>. Note that to bind the &#8216;<code class="lit">&quot;</code>&#8217; or &#8216;<code class="lit">'</code>&#8217; keys, quotation marks are necessary, for example:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
bind-key '&quot;' split-window 
bind-key &quot;'&quot; new-window</pre>
<p>
Commands related to key bindings are as follows:<dl style="margin-top: 0.00em;margin-bottom: 0.00em;" class="list list-tag">
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">bind-key</b> &#91;<span class="opt"><b class="flag">&#45;cnr</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">mode-table</i></span>&#93; <i class="arg">key</i> <i class="arg">command</i> &#91;<span class="opt"><i class="arg">arguments</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">bind</b>)</div>
</blockquote>
Bind key <i class="arg">key</i> to <i class="arg">command</i>. By default (without <b class="flag">&#45;t</b>) the primary key bindings are modified (those normally activated with the prefix key); in this case, if <b class="flag">&#45;n</b> is specified, it is not necessary to use the prefix key, <i class="arg">command</i> is bound to <i class="arg">key</i> alone. The <b class="flag">&#45;r</b> flag indicates this key may repeat, see the <b class="cmd">repeat-time</b> option.<p>
If <b class="flag">&#45;t</b> is present, <i class="arg">key</i> is bound in <i class="arg">mode-table</i>: the binding for command mode with <b class="flag">&#45;c</b> or for normal mode without. To view the default bindings and possible commands, see the <b class="cmd">list-keys</b> command.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">list-keys</b> &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">key-table</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">lsk</b>)</div>
</blockquote>
List all key bindings. Without <b class="flag">&#45;t</b> the primary key bindings - those executed when preceded by the prefix key - are printed.<p>
With <b class="flag">&#45;t</b>, the key bindings in <i class="arg">key-table</i> are listed; this may be one of: <span class="emph">vi-edit</span>, <span class="emph">emacs-edit</span>, <span class="emph">vi-choice</span>, <span class="emph">emacs-choice</span>, <span class="emph">vi-copy</span> or <span class="emph">emacs-copy</span>.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">send-keys</b> &#91;<span class="opt"><b class="flag">&#45;lR</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-pane</i></span>&#93; <i class="arg">key</i> <i class="arg">...</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">send</b>)</div>
</blockquote>
Send a key or keys to a window. Each argument <i class="arg">key</i> is the name of the key (such as &#8216;<code class="lit">C-a</code>&#8217; or &#8216;<code class="lit">npage</code>&#8217; ) to send; if the string is not recognised as a key, it is sent as a series of characters. The <b class="flag">&#45;l</b> flag disables key name lookup and sends the keys literally. All arguments are sent sequentially from first to last. The <b class="flag">&#45;R</b> flag causes the terminal state to be reset.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">send-prefix</b> &#91;<span class="opt"><b class="flag">&#45;2</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-pane</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Send the prefix key, or with <b class="flag">&#45;2</b> the secondary prefix key, to a window as if it was pressed.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">unbind-key</b> &#91;<span class="opt"><b class="flag">&#45;acn</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">mode-table</i></span>&#93; <i class="arg">key</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">unbind</b>)</div>
</blockquote>
Unbind the command bound to <i class="arg">key</i>. Without <b class="flag">&#45;t</b> the primary key bindings are modified; in this case, if <b class="flag">&#45;n</b> is specified, the command bound to <i class="arg">key</i> without a prefix (if any) is removed. If <b class="flag">&#45;a</b> is present, all key bindings are removed.<p>
If <b class="flag">&#45;t</b> is present, <i class="arg">key</i> in <i class="arg">mode-table</i> is unbound: the binding for command mode with <b class="flag">&#45;c</b> or for normal mode without.</dd>
</dl>
</div>
<div class="section">
<h1 id="x4f5054494f4e53">OPTIONS</h1> The appearance and behaviour of <b class="name">tmux</b> may be modified by changing the value of various options. There are three types of option: <span class="emph">server options</span>, <span class="emph">session options</span> and <span class="emph">window options</span>.<p>
The <b class="name">tmux</b> server has a set of global options which do not apply to any particular window or session. These are altered with the <b class="cmd">set-option</b> <b class="flag">&#45;s</b> command, or displayed with the <b class="cmd">show-options</b> <b class="flag">&#45;s</b> command.<p>
In addition, each individual session may have a set of session options, and there is a separate set of global session options. Sessions which do not have a particular option configured inherit the value from the global session options. Session options are set or unset with the <b class="cmd">set-option</b> command and may be listed with the <b class="cmd">show-options</b> command. The available server and session options are listed under the <b class="cmd">set-option</b> command.<p>
Similarly, a set of window options is attached to each window, and there is a set of global window options from which any unset options are inherited. Window options are altered with the <b class="cmd">set-window-option</b> command and can be listed with the <b class="cmd">show-window-options</b> command. All window options are documented with the <b class="cmd">set-window-option</b> command.<p>
<b class="name">tmux</b> also supports user options which are prefixed with a &#8216;<code class="lit">@</code>&#8217;. User options may have any name, so long as they are prefixed with &#8216;<code class="lit">@</code>&#8217;, and be set to any string. For example<p>
<pre style="margin-left: 5.00ex;" class="lit display">
$ tmux setw -q @foo &quot;abc123&quot; 
$ tmux showw -v @foo 
abc123</pre>
<p>
Commands which set options are as follows:<dl style="margin-top: 0.00em;margin-bottom: 0.00em;" class="list list-tag">
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">set-option</b> &#91;<span class="opt"><b class="flag">&#45;agoqsuw</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-session</i> | <i class="arg">target-window</i></span>&#93; <i class="arg">option</i> <i class="arg">value</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">set</b>)</div>
</blockquote>
Set a window option with <b class="flag">&#45;w</b> (equivalent to the <b class="cmd">set-window-option</b> command), a server option with <b class="flag">&#45;s</b>, otherwise a session option.<p>
If <b class="flag">&#45;g</b> is specified, the global session or window option is set. The <b class="flag">&#45;u</b> flag unsets an option, so a session inherits the option from the global options. It is not possible to unset a global option.<p>
The <b class="flag">&#45;o</b> flag prevents setting an option that is already set.<p>
The <b class="flag">&#45;q</b> flag suppresses errors about unknown options.<p>
With <b class="flag">&#45;a</b>, and if the option expects a string or a style, <i class="arg">value</i> is appended to the existing setting. For example:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
set -g status-left &quot;foo&quot; 
set -ag status-left &quot;bar&quot;</pre>
<p>
Will result in &#8216;<code class="lit">foobar</code>&#8217;. And:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
set -g status-style &quot;bg=red&quot; 
set -ag status-style &quot;fg=blue&quot;</pre>
<p>
Will result in a red background <span class="emph">and</span> blue foreground. Without <b class="flag">&#45;a</b>, the result would be the default background and a blue foreground.<p>
Available window options are listed under <b class="cmd">set-window-option</b>.<p>
<i class="arg">value</i> depends on the option and may be a number, a string, or a flag (on, off, or omitted to toggle).<p>
Available server options are:<dl style="margin-top: 0.00em;margin-bottom: 0.00em;" class="list list-tag">
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">buffer-limit</b> <i class="arg">number</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set the number of buffers; as new buffers are added to the top of the stack, old ones are removed from the bottom if necessary to maintain this maximum length.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">escape-time</b> <i class="arg">time</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set the time in milliseconds for which <b class="name">tmux</b> waits after an escape is input to determine if it is part of a function or meta key sequences. The default is 500 milliseconds.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">exit-unattached</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
If enabled, the server will exit when there are no attached clients.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">focus-events</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
When enabled, focus events are requested from the terminal if supported and passed through to applications running in <b class="name">tmux</b>. Attached clients should be detached and attached again after changing this option.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">message-limit</b> <i class="arg">number</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set the number of error or information messages to save in the message log for each client. The default is 100.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">set-clipboard</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Attempt to set the terminal clipboard content using the &#92;e]52;...&#92;007 <a class="link-man" href="/cgi-bin/man.cgi?query=xterm&amp;sec=1">xterm(1)</a> escape sequences. This option is on by default if there is an <span class="emph">Ms</span> entry in the <a class="link-man" href="/cgi-bin/man.cgi?query=terminfo&amp;sec=5">terminfo(5)</a> description for the client terminal. Note that this feature needs to be enabled in <a class="link-man" href="/cgi-bin/man.cgi?query=xterm&amp;sec=1">xterm(1)</a> by setting the resource:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
disallowedWindowOps: 20,21,SetXprop</pre>
<p>
Or changing this property from the <a class="link-man" href="/cgi-bin/man.cgi?query=xterm&amp;sec=1">xterm(1)</a> interactive menu when required.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">terminal-overrides</b> <i class="arg">string</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Contains a list of entries which override terminal descriptions read using <a class="link-man" href="/cgi-bin/man.cgi?query=terminfo&amp;sec=5">terminfo(5)</a>. <i class="arg">string</i> is a comma-separated list of items each a colon-separated string made up of a terminal type pattern (matched using <a class="link-man" href="/cgi-bin/man.cgi?query=fnmatch&amp;sec=3">fnmatch(3)</a>) and a set of <span class="emph">name=value</span> entries.<p>
For example, to set the &#8216;<code class="lit">clear</code>&#8217; <a class="link-man" href="/cgi-bin/man.cgi?query=terminfo&amp;sec=5">terminfo(5)</a> entry to &#8216;<code class="lit">&#92;e[H&#92;e[2J</code>&#8217; for all terminal types and the &#8216;<code class="lit">dch1</code>&#8217; entry to &#8216;<code class="lit">&#92;e[P</code>&#8217; for the &#8216;<code class="lit">rxvt</code>&#8217; terminal type, the option could be set to the string:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
&quot;*:clear=&#92;e[H&#92;e[2J,rxvt:dch1=&#92;e[P&quot;</pre>
<p>
The terminal entry value is passed through <a class="link-man" href="/cgi-bin/man.cgi?query=strunvis&amp;sec=3">strunvis(3)</a> before interpretation. The default value forcibly corrects the &#8216;<code class="lit">colors</code>&#8217; entry for terminals which support 256 colours:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
&quot;*256col*:colors=256,xterm*:XT&quot;</pre>
</dd>
</dl>
<p>
Available session options are:<dl style="margin-top: 0.00em;margin-bottom: 0.00em;" class="list list-tag">
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">assume-paste-time</b> <i class="arg">milliseconds</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
If keys are entered faster than one in <i class="arg">milliseconds</i>, they are assumed to have been pasted rather than typed and <b class="name">tmux</b> key bindings are not processed. The default is one millisecond and zero disables.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">base-index</b> <i class="arg">index</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set the base index from which an unused index should be searched when a new window is created. The default is zero.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">bell-action</b> &#91;<span class="opt"><b class="cmd">any</b> | <b class="cmd">none</b> | <b class="cmd">current</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set action on window bell. <b class="cmd">any</b> means a bell in any window linked to a session causes a bell in the current window of that session, <b class="cmd">none</b> means all bells are ignored and <b class="cmd">current</b> means only bells in windows other than the current window are ignored.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">bell-on-alert</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
If on, ring the terminal bell when an alert occurs.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">default-command</b> <i class="arg">shell-command</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set the command used for new windows (if not specified when the window is created) to <i class="arg">shell-command</i>, which may be any <a class="link-man" href="/cgi-bin/man.cgi?query=sh&amp;sec=1">sh(1)</a> command. The default is an empty string, which instructs <b class="name">tmux</b> to create a login shell using the value of the <b class="cmd">default-shell</b> option.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">default-shell</b> <i class="arg">path</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Specify the default shell. This is used as the login shell for new windows when the <b class="cmd">default-command</b> option is set to empty, and must be the full path of the executable. When started <b class="name">tmux</b> tries to set a default value from the first suitable of the <span class="env">SHELL</span> environment variable, the shell returned by <a class="link-man" href="/cgi-bin/man.cgi?query=getpwuid&amp;sec=3">getpwuid(3)</a>, or <i class="file">/bin/sh</i>. This option should be configured when <b class="name">tmux</b> is used as a login shell.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">default-terminal</b> <i class="arg">terminal</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set the default terminal for new windows created in this session - the default value of the <span class="env">TERM</span> environment variable. For <b class="name">tmux</b> to work correctly, this <span class="emph">must</span> be set to &#8216;<code class="lit">screen</code>&#8217; or a derivative of it.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">destroy-unattached</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
If enabled and the session is no longer attached to any clients, it is destroyed.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">detach-on-destroy</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
If on (the default), the client is detached when the session it is attached to is destroyed. If off, the client is switched to the most recently active of the remaining sessions.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">display-panes-active-colour</b> <i class="arg">colour</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set the colour used by the <b class="cmd">display-panes</b> command to show the indicator for the active pane.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">display-panes-colour</b> <i class="arg">colour</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set the colour used by the <b class="cmd">display-panes</b> command to show the indicators for inactive panes.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">display-panes-time</b> <i class="arg">time</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set the time in milliseconds for which the indicators shown by the <b class="cmd">display-panes</b> command appear.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">display-time</b> <i class="arg">time</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set the amount of time for which status line messages and other on-screen indicators are displayed. <i class="arg">time</i> is in milliseconds.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">history-limit</b> <i class="arg">lines</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set the maximum number of lines held in window history. This setting applies only to new windows - existing window histories are not resized and retain the limit at the point they were created.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">lock-after-time</b> <i class="arg">number</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Lock the session (like the <b class="cmd">lock-session</b> command) after <i class="arg">number</i> seconds of inactivity, or the entire server (all sessions) if the <b class="cmd">lock-server</b> option is set. The default is not to lock (set to 0).</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">lock-command</b> <i class="arg">shell-command</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Command to run when locking each client. The default is to run <a class="link-man" href="/cgi-bin/man.cgi?query=lock&amp;sec=1">lock(1)</a> with <b class="flag">&#45;np</b>.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">lock-server</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
If this option is <b class="cmd">on</b> (the default), instead of each session locking individually as each has been idle for <b class="cmd">lock-after-time</b>, the entire server will lock after <span class="emph">all</span> sessions would have locked. This has no effect as a session option; it must be set as a global option.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">message-command-style</b> <i class="arg">style</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set status line message command style, where <i class="arg">style</i> is a comma-separated list of characteristics to be specified.<p>
These may be &#8216;<code class="lit">bg=colour</code>&#8217; to set the background colour, &#8216;<code class="lit">fg=colour</code>&#8217; to set the foreground colour, and a list of attributes as specified below.<p>
The colour is one of: <b class="cmd">black</b>, <b class="cmd">red</b>, <b class="cmd">green</b>, <b class="cmd">yellow</b>, <b class="cmd">blue</b>, <b class="cmd">magenta</b>, <b class="cmd">cyan</b>, <b class="cmd">white</b>, aixterm bright variants (if supported: <b class="cmd">brightred</b>, <b class="cmd">brightgreen</b>, and so on), <b class="cmd">colour0</b> to <b class="cmd">colour255</b> from the 256-colour set, <b class="cmd">default</b>, or a hexadecimal RGB string such as &#8216;<code class="lit">#ffffff</code>&#8217;, which chooses the closest match from the default 256-colour set.<p>
The attributes is either <b class="cmd">none</b> or a comma-delimited list of one or more of: <b class="cmd">bright</b> (or <b class="cmd">bold</b>), <b class="cmd">dim</b>, <b class="cmd">underscore</b>, <b class="cmd">blink</b>, <b class="cmd">reverse</b>, <b class="cmd">hidden</b>, or <b class="cmd">italics</b>, to turn an attribute on, or an attribute prefixed with &#8216;<code class="lit">no</code>&#8217; to turn one off.<p>
Examples are:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
fg=yellow,bold,underscore,blink 
bg=black,fg=default,noreverse</pre>
<p>
With the <b class="flag">&#45;a</b> flag to the <b class="cmd">set-option</b> command the new style is added otherwise the existing style is replaced.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">message-style</b> <i class="arg">style</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set status line message style. For how to specify <i class="arg">style</i>, see the <b class="cmd">message-command-style</b> option.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">mouse-resize-pane</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
If on, <b class="name">tmux</b> captures the mouse and allows panes to be resized by dragging on their borders.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">mouse-select-pane</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
If on, <b class="name">tmux</b> captures the mouse and when a window is split into multiple panes the mouse may be used to select the current pane. The mouse click is also passed through to the application as normal.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">mouse-select-window</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
If on, clicking the mouse on a window name in the status line will select that window.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">mouse-utf8</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
If enabled, request mouse input as UTF-8 on UTF-8 terminals.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">pane-active-border-style</b> <i class="arg">style</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set the pane border style for the currently active pane. For how to specify <i class="arg">style</i>, see the <b class="cmd">message-command-style</b> option. Attributes are ignored.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">pane-border-style</b> <i class="arg">style</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set the pane border style for paneas aside from the active pane. For how to specify <i class="arg">style</i>, see the <b class="cmd">message-command-style</b> option. Attributes are ignored.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">prefix</b> <i class="arg">key</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set the key accepted as a prefix key.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">prefix2</b> <i class="arg">key</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set a secondary key accepted as a prefix key.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">renumber-windows</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
If on, when a window is closed in a session, automatically renumber the other windows in numerical order. This respects the <b class="cmd">base-index</b> option if it has been set. If off, do not renumber the windows.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">repeat-time</b> <i class="arg">time</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Allow multiple commands to be entered without pressing the prefix-key again in the specified <i class="arg">time</i> milliseconds (the default is 500). Whether a key repeats may be set when it is bound using the <b class="flag">&#45;r</b> flag to <b class="cmd">bind-key</b>. Repeat is enabled for the default keys bound to the <b class="cmd">resize-pane</b> command.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">set-remain-on-exit</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set the <b class="cmd">remain-on-exit</b> window option for any windows first created in this session. When this option is true, windows in which the running program has exited do not close, instead remaining open but inactivate. Use the <b class="cmd">respawn-window</b> command to reactivate such a window, or the <b class="cmd">kill-window</b> command to destroy it.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">set-titles</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Attempt to set the client terminal title using the <span class="emph">tsl</span> and <span class="emph">fsl</span> <a class="link-man" href="/cgi-bin/man.cgi?query=terminfo&amp;sec=5">terminfo(5)</a> entries if they exist. <b class="name">tmux</b> automatically sets these to the &#92;e]2;...&#92;007 sequence if the terminal appears to be an xterm. This option is off by default. Note that elinks will only attempt to set the window title if the STY environment variable is set.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">set-titles-string</b> <i class="arg">string</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
String used to set the window title if <b class="cmd">set-titles</b> is on. Character sequences are replaced as for the <b class="cmd">status-left</b> option.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">status</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Show or hide the status line.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">status-interval</b> <i class="arg">interval</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Update the status bar every <i class="arg">interval</i> seconds. By default, updates will occur every 15 seconds. A setting of zero disables redrawing at interval.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">status-justify</b> &#91;<span class="opt"><b class="cmd">left</b> | <b class="cmd">centre</b> | <b class="cmd">right</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set the position of the window list component of the status line: left, centre or right justified.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">status-keys</b> &#91;<span class="opt"><b class="cmd">vi</b> | <b class="cmd">emacs</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Use vi or emacs-style key bindings in the status line, for example at the command prompt. The default is emacs, unless the <span class="env">VISUAL</span> or <span class="env">EDITOR</span> environment variables are set and contain the string &#8216;<code class="lit">vi</code>&#8217;.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">status-left</b> <i class="arg">string</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Display <i class="arg">string</i> (by default the session name) to the left of the status bar. <i class="arg">string</i> will be passed through <a class="link-man" href="/cgi-bin/man.cgi?query=strftime&amp;sec=3">strftime(3)</a> and formats (see <i class="link-sec"><a class="link-sec" href="#x464f524d415453">FORMATS</a></i>) will be expanded. It may also contain any of the following special character sequences:<table style="margin-top: 0.00em;margin-bottom: 0.00em;margin-left: 5.00ex;" class="list list-col">
<col style="width: 0.58ex;">
<col style="min-width: 0.54ex;">
<tbody>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<span class="symb">Character pair</span></td>
<td class="list-col" style="margin-top: 1.00em;">
<span class="symb">Replaced with</span></td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">#(shell-command)</code></td>
<td class="list-col" style="margin-top: 1.00em;">
First line of the command's output</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">#[attributes]</code></td>
<td class="list-col" style="margin-top: 1.00em;">
Colour or attribute change</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">##</code></td>
<td class="list-col" style="margin-top: 1.00em;">
A literal &#8216;<code class="lit">#</code>&#8217;</td>
</tr>
</tbody>
</table>
<p>
The #(shell-command) form executes &#8216;<code class="lit">shell-command</code>&#8217; and inserts the first line of its output. Note that shell commands are only executed once at the interval specified by the <b class="cmd">status-interval</b> option: if the status line is redrawn in the meantime, the previous result is used. Shell commands are executed with the <b class="name">tmux</b> global environment set (see the <i class="link-sec"><a class="link-sec" href="#x454e5649524f4e4d454e54">ENVIRONMENT</a></i> section).<p>
For details on how the names and titles can be set see the <i class="link-sec"><a class="link-sec" href="#x4e414d455320414e44205449544c4553">NAMES AND TITLES</a></i> section. For a list of allowed attributes see the <b class="cmd">message-command-style</b> option.<p>
Examples are:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
#(sysctl vm.loadavg) 
#[fg=yellow,bold]#(apm -l)%%#[default] [#S]</pre>
<p>
By default, UTF-8 in <i class="arg">string</i> is not interpreted, to enable UTF-8, use the <b class="cmd">status-utf8</b> option.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">status-left-length</b> <i class="arg">length</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set the maximum <i class="arg">length</i> of the left component of the status bar. The default is 10.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">status-left-style</b> <i class="arg">style</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set the style of the left part of the status line. For how to specify <i class="arg">style</i>, see the <b class="cmd">message-command-style</b> option.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">status-position</b> &#91;<span class="opt"><b class="cmd">top</b> | <b class="cmd">bottom</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set the position of the status line.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">status-right</b> <i class="arg">string</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Display <i class="arg">string</i> to the right of the status bar. By default, the current window title in double quotes, the date and the time are shown. As with <b class="cmd">status-left</b>, <i class="arg">string</i> will be passed to <a class="link-man" href="/cgi-bin/man.cgi?query=strftime&amp;sec=3">strftime(3)</a>, character pairs are replaced, and UTF-8 is dependent on the <b class="cmd">status-utf8</b> option.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">status-right-length</b> <i class="arg">length</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set the maximum <i class="arg">length</i> of the right component of the status bar. The default is 40.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">status-right-style</b> <i class="arg">style</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set the style of the right part of the status line. For how to specify <i class="arg">style</i>, see the <b class="cmd">message-command-style</b> option.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">status-style</b> <i class="arg">style</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set status line style. For how to specify <i class="arg">style</i>, see the <b class="cmd">message-command-style</b> option.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">status-utf8</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Instruct <b class="name">tmux</b> to treat top-bit-set characters in the <b class="cmd">status-left</b> and <b class="cmd">status-right</b> strings as UTF-8; notably, this is important for wide characters. This option defaults to off.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">update-environment</b> <i class="arg">variables</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set a space-separated string containing a list of environment variables to be copied into the session environment when a new session is created or an existing session is attached. Any variables that do not exist in the source environment are set to be removed from the session environment (as if <b class="flag">&#45;r</b> was given to the <b class="cmd">set-environment</b> command). The default is &quot;DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY&quot;.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">visual-activity</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
If on, display a status line message when activity occurs in a window for which the <b class="cmd">monitor-activity</b> window option is enabled.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">visual-bell</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
If this option is on, a message is shown on a bell instead of it being passed through to the terminal (which normally makes a sound). Also see the <b class="cmd">bell-action</b> option.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">visual-silence</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
If <b class="cmd">monitor-silence</b> is enabled, prints a message after the interval has expired on a given window.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">word-separators</b> <i class="arg">string</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Sets the session's conception of what characters are considered word separators, for the purposes of the next and previous word commands in copy mode. The default is &#8216;<code class="lit">&#160;-_@</code>&#8217;.</dd>
</dl>
</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">set-window-option</b> &#91;<span class="opt"><b class="flag">&#45;agoqu</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-window</i></span>&#93; <i class="arg">option</i> <i class="arg">value</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">setw</b>)</div>
</blockquote>
Set a window option. The <b class="flag">&#45;a</b>, <b class="flag">&#45;g</b>, <b class="flag">&#45;o</b>, <b class="flag">&#45;q</b> and <b class="flag">&#45;u</b> flags work similarly to the <b class="cmd">set-option</b> command.<p>
Supported window options are:<p>
<dl style="margin-top: 0.00em;margin-bottom: 0.00em;" class="list list-tag">
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">aggressive-resize</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Aggressively resize the chosen window. This means that <b class="name">tmux</b> will resize the window to the size of the smallest session for which it is the current window, rather than the smallest session to which it is attached. The window may resize when the current window is changed on another sessions; this option is good for full-screen programs which support <span class="define">SIGWINCH</span> and poor for interactive programs such as shells.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">allow-rename</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Allow programs to change the window name using a terminal escape sequence (\033k...\033\\). The default is on.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">alternate-screen</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
This option configures whether programs running inside <b class="name">tmux</b> may use the terminal alternate screen feature, which allows the <span class="emph">smcup</span> and <span class="emph">rmcup</span> <a class="link-man" href="/cgi-bin/man.cgi?query=terminfo&amp;sec=5">terminfo(5)</a> capabilities. The alternate screen feature preserves the contents of the window when an interactive application starts and restores it on exit, so that any output visible before the application starts reappears unchanged after it exits. The default is on.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">automatic-rename</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Control automatic window renaming. When this setting is enabled, <b class="name">tmux</b> will rename the window automatically using the format specified by <b class="cmd">automatic-rename-format</b>. This flag is automatically disabled for an individual window when a name is specified at creation with <b class="cmd">new-window</b> or <b class="cmd">new-session</b>, or later with <b class="cmd">rename-window</b>, or with a terminal escape sequence. It may be switched off globally with:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
set-window-option -g automatic-rename off</pre>
<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">automatic-rename-format</b> <i class="arg">format</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
The format (see <i class="link-sec"><a class="link-sec" href="#x464f524d415453">FORMATS</a></i>) used when the <b class="cmd">automatic-rename</b> option is enabled.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">c0-change-interval</b> <i class="arg">interval</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">c0-change-trigger</b> <i class="arg">trigger</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
These two options configure a simple form of rate limiting for a pane. If <b class="name">tmux</b> sees more than <i class="arg">trigger</i> C0 sequences that modify the screen (for example, carriage returns, linefeeds or backspaces) in one millisecond, it will stop updating the pane immediately and instead redraw it entirely every <i class="arg">interval</i> milliseconds. This helps to prevent fast output (such as <a class="link-man" href="/cgi-bin/man.cgi?query=yes&amp;sec=1">yes(1)</a>) overwhelming the terminal. The default is a trigger of 250 and an interval of 100. A trigger of zero disables the rate limiting.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">clock-mode-colour</b> <i class="arg">colour</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set clock colour.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">clock-mode-style</b> &#91;<span class="opt"><b class="cmd">12</b> | <b class="cmd">24</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set clock hour format.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">force-height</b> <i class="arg">height</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">force-width</b> <i class="arg">width</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Prevent <b class="name">tmux</b> from resizing a window to greater than <i class="arg">width</i> or <i class="arg">height</i>. A value of zero restores the default unlimited setting.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">main-pane-height</b> <i class="arg">height</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">main-pane-width</b> <i class="arg">width</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set the width or height of the main (left or top) pane in the <b class="cmd">main-horizontal</b> or <b class="cmd">main-vertical</b> layouts.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">mode-keys</b> &#91;<span class="opt"><b class="cmd">vi</b> | <b class="cmd">emacs</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Use vi or emacs-style key bindings in copy and choice modes. As with the <b class="cmd">status-keys</b> option, the default is emacs, unless <span class="env">VISUAL</span> or <span class="env">EDITOR</span> contains &#8216;<code class="lit">vi</code>&#8217;.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">mode-mouse</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b> | <b class="cmd">copy-mode</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Mouse state in modes. If on, the mouse may be used to enter copy mode and copy a selection by dragging, to enter copy mode and scroll with the mouse wheel, or to select an option in choice mode. If set to <span class="emph">copy-mode</span>, the mouse behaves as set to on, but cannot be used to enter copy mode.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">mode-style</b> <i class="arg">style</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set window modes style. For how to specify <i class="arg">style</i>, see the <b class="cmd">message-command-style</b> option.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">monitor-activity</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Monitor for activity in the window. Windows with activity are highlighted in the status line.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">monitor-silence</b> &#91;<span class="opt"><b class="cmd">interval</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Monitor for silence (no activity) in the window within <b class="cmd">interval</b> seconds. Windows that have been silent for the interval are highlighted in the status line. An interval of zero disables the monitoring.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">other-pane-height</b> <i class="arg">height</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set the height of the other panes (not the main pane) in the <b class="cmd">main-horizontal</b> layout. If this option is set to 0 (the default), it will have no effect. If both the <b class="cmd">main-pane-height</b> and <b class="cmd">other-pane-height</b> options are set, the main pane will grow taller to make the other panes the specified height, but will never shrink to do so.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">other-pane-width</b> <i class="arg">width</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Like <b class="cmd">other-pane-height</b>, but set the width of other panes in the <b class="cmd">main-vertical</b> layout.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">pane-base-index</b> <i class="arg">index</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Like <b class="cmd">base-index</b>, but set the starting index for pane numbers.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">remain-on-exit</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
A window with this flag set is not destroyed when the program running in it exits. The window may be reactivated with the <b class="cmd">respawn-window</b> command.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">synchronize-panes</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Duplicate input to any pane to all other panes in the same window (only for panes that are not in any special mode).<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">utf8</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Instructs <b class="name">tmux</b> to expect UTF-8 sequences to appear in this window.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">window-status-activity-style</b> <i class="arg">style</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set status line style for windows with an activity alert. For how to specify <i class="arg">style</i>, see the <b class="cmd">message-command-style</b> option.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">window-status-bell-style</b> <i class="arg">style</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set status line style for windows with a bell alert. For how to specify <i class="arg">style</i>, see the <b class="cmd">message-command-style</b> option.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">window-status-current-format</b> <i class="arg">string</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Like <i class="arg">window-status-format</i>, but is the format used when the window is the current window.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">window-status-current-style</b> <i class="arg">style</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set status line style for the currently active window. For how to specify <i class="arg">style</i>, see the <b class="cmd">message-command-style</b> option.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">window-status-format</b> <i class="arg">string</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set the format in which the window is displayed in the status line window list. See the <i class="arg">status-left</i> option for details of special character sequences available. The default is &#8216;<code class="lit">#I:#W#F</code>&#8217;.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">window-status-last-style</b> <i class="arg">style</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set status line style for the last active window. For how to specify <i class="arg">style</i>, see the <b class="cmd">message-command-style</b> option.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">window-status-separator</b> <i class="arg">string</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Sets the separator drawn between windows in the status line. The default is a single space character.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">window-status-style</b> <i class="arg">style</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set status line style for a single window. For how to specify <i class="arg">style</i>, see the <b class="cmd">message-command-style</b> option.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">xterm-keys</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
If this option is set, <b class="name">tmux</b> will generate <a class="link-man" href="/cgi-bin/man.cgi?query=xterm&amp;sec=1">xterm(1)</a> -style function key sequences; these have a number included to indicate modifiers such as Shift, Alt or Ctrl. The default is off.<p>
</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<b class="cmd">wrap-search</b> &#91;<span class="opt"><b class="cmd">on</b> | <b class="cmd">off</b></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
If this option is set, searches will wrap around the end of the pane contents. The default is on.</dd>
</dl>
</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">show-options</b> &#91;<span class="opt"><b class="flag">&#45;gqsvw</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-session</i> | <i class="arg">target-window</i></span>&#93; &#91;<span class="opt"><i class="arg">option</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">show</b>)</div>
</blockquote>
Show the window options (or a single window option if given) with <b class="flag">&#45;w</b> (equivalent to <b class="cmd">show-window-options</b>), the server options with <b class="flag">&#45;s</b>, otherwise the session options for <i class="arg">target session</i>. Global session or window options are listed if <b class="flag">&#45;g</b> is used. <b class="flag">&#45;v</b> shows only the option value, not the name. If <b class="flag">&#45;q</b> is set, no error will be returned if <i class="arg">option</i> is unset.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">show-window-options</b> &#91;<span class="opt"><b class="flag">&#45;gv</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-window</i></span>&#93; &#91;<span class="opt"><i class="arg">option</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">showw</b>)</div>
</blockquote>
List the window options or a single option for <i class="arg">target-window</i>, or the global window options if <b class="flag">&#45;g</b> is used. <b class="flag">&#45;v</b> shows only the option value, not the name.</dd>
</dl>
</div>
<div class="section">
<h1 id="x464f524d415453">FORMATS</h1> Certain commands accept the <b class="flag">&#45;F</b> flag with a <i class="arg">format</i> argument. This is a string which controls the output format of the command. Replacement variables are enclosed in &#8216;<code class="lit">#{</code>&#8217; and &#8216;<code class="lit">}</code>&#8217;, for example &#8216;<code class="lit">#{session_name}</code>&#8217;. Some variables also have an shorter alias such as &#8216;<code class="lit">#S</code>&#8217;. &#8216;<code class="lit">##</code>&#8217; is replaced by a single &#8216;<code class="lit">#</code>&#8217;. Conditionals are also accepted by prefixing with &#8216;<code class="lit">?</code>&#8217; and separating two alternatives with a comma; if the specified variable exists and is not zero, the first alternative is chosen, otherwise the second is used. For example &#8216;<code class="lit">#{?session_attached,attached,not attached}</code>&#8217; will include the string &#8216;<code class="lit">attached</code>&#8217; if the session is attached and the string &#8216;<code class="lit">not attached</code>&#8217; if it is unattached. A limit may be placed on the length of the resultant string by prefixing it by an &#8216;<code class="lit">=</code>&#8217;, a number and a colon, so &#8216;<code class="lit">#{=10:pane_title}</code>&#8217; will include at most the first 10 characters of the pane title.<p>
The following variables are available, where appropriate:<table style="margin-top: 0.00em;margin-bottom: 0.00em;" class="list list-col">
<col style="width: 0.79ex;">
<col style="min-width: 0.21ex;">
<tbody>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<span class="symb">Variable name</span></td>
<td class="list-col" style="margin-top: 1.00em;">
<span class="symb">Alias</span></td>
<td class="list-col" style="margin-top: 1.00em;">
<span class="symb">Replaced with</span></td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">alternate_on</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
If pane is in alternate screen</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">alternate_saved_x</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Saved cursor X in alternate screen</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">alternate_saved_y</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Saved cursor Y in alternate screen</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">buffer_sample</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Sample of start of buffer</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">buffer_size</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Size of the specified buffer in bytes</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">client_activity</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Integer time client last had activity</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">client_activity_string</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
String time client last had activity</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">client_created</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Integer time client created</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">client_created_string</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
String time client created</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">client_height</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Height of client</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">client_last_session</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Name of the client's last session</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">client_prefix</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
1 if prefix key has been pressed</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">client_readonly</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
1 if client is readonly</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">client_session</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Name of the client's session</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">client_termname</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Terminal name of client</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">client_tty</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Pseudo terminal of client</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">client_utf8</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
1 if client supports utf8</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">client_width</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Width of client</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">cursor_flag</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Pane cursor flag</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">cursor_x</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Cursor X position in pane</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">cursor_y</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Cursor Y position in pane</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">history_bytes</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Number of bytes in window history</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">history_limit</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Maximum window history lines</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">history_size</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Size of history in bytes</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">host</code></td>
<td class="list-col" style="margin-top: 1.00em;">
#H</td>
<td class="list-col" style="margin-top: 1.00em;">
Hostname of local host</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">host_short</code></td>
<td class="list-col" style="margin-top: 1.00em;">
#h</td>
<td class="list-col" style="margin-top: 1.00em;">
Hostname of local host (no domain name)</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">insert_flag</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Pane insert flag</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">keypad_cursor_flag</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Pane keypad cursor flag</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">keypad_flag</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Pane keypad flag</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">line</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Line number in the list</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">mouse_any_flag</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Pane mouse any flag</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">mouse_button_flag</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Pane mouse button flag</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">mouse_standard_flag</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Pane mouse standard flag</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">mouse_utf8_flag</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Pane mouse UTF-8 flag</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">pane_active</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
1 if active pane</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">pane_bottom</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Bottom of pane</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">pane_current_command</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Current command if available</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">pane_dead</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
1 if pane is dead</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">pane_height</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Height of pane</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">pane_id</code></td>
<td class="list-col" style="margin-top: 1.00em;">
#D</td>
<td class="list-col" style="margin-top: 1.00em;">
Unique pane ID</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">pane_in_mode</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
If pane is in a mode</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">pane_index</code></td>
<td class="list-col" style="margin-top: 1.00em;">
#P</td>
<td class="list-col" style="margin-top: 1.00em;">
Index of pane</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">pane_left</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Left of pane</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">pane_pid</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
PID of first process in pane</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">pane_right</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Right of pane</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">pane_start_command</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Command pane started with</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">pane_synchronized</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
If pane is synchronized</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">pane_tabs</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Pane tab positions</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">pane_title</code></td>
<td class="list-col" style="margin-top: 1.00em;">
#T</td>
<td class="list-col" style="margin-top: 1.00em;">
Title of pane</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">pane_top</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Top of pane</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">pane_tty</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Pseudo terminal of pane</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">pane_width</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Width of pane</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">saved_cursor_x</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Saved cursor X in pane</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">saved_cursor_y</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Saved cursor Y in pane</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">scroll_region_lower</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Bottom of scroll region in pane</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">scroll_region_upper</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Top of scroll region in pane</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">session_attached</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Number of clients session is attached to</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">session_created</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Integer time session created</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">session_created_string</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
String time session created</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">session_group</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Number of session group</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">session_grouped</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
1 if session in a group</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">session_height</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Height of session</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">session_id</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Unique session ID</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">session_many_attached</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
1 if multiple clients attached</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">session_name</code></td>
<td class="list-col" style="margin-top: 1.00em;">
#S</td>
<td class="list-col" style="margin-top: 1.00em;">
Name of session</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">session_width</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Width of session</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">session_windows</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Number of windows in session</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">window_active</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
1 if window active</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">window_activity_flag</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
1 if window has activity alert</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">window_bell_flag</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
1 if window has bell</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">window_find_matches</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Matched data from the find-window</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">window_flags</code></td>
<td class="list-col" style="margin-top: 1.00em;">
#F</td>
<td class="list-col" style="margin-top: 1.00em;">
Window flags</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">window_height</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Height of window</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">window_id</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Unique window ID</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">window_index</code></td>
<td class="list-col" style="margin-top: 1.00em;">
#I</td>
<td class="list-col" style="margin-top: 1.00em;">
Index of window</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">window_layout</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Window layout description</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">window_name</code></td>
<td class="list-col" style="margin-top: 1.00em;">
#W</td>
<td class="list-col" style="margin-top: 1.00em;">
Name of window</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">window_panes</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Number of panes in window</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">window_silence_flag</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
1 if window has silence alert</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">window_width</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Width of window</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">wrap_flag</code></td>
<td class="list-col" style="margin-top: 1.00em;">
</td>
<td class="list-col" style="margin-top: 1.00em;">
Pane wrap flag</td>
</tr>
</tbody>
</table>
</div>
<div class="section">
<h1 id="x4e414d455320414e44205449544c4553">NAMES AND TITLES</h1> <b class="name">tmux</b> distinguishes between names and titles. Windows and sessions have names, which may be used to specify them in targets and are displayed in the status line and various lists: the name is the <b class="name">tmux</b> identifier for a window or session. Only panes have titles. A pane's title is typically set by the program running inside the pane and is not modified by <b class="name">tmux</b>. It is the same mechanism used to set for example the <a class="link-man" href="/cgi-bin/man.cgi?query=xterm&amp;sec=1">xterm(1)</a> window title in an <a class="link-man" href="/cgi-bin/man.cgi?query=X&amp;sec=7">X(7)</a> window manager. Windows themselves do not have titles - a window's title is the title of its active pane. <b class="name">tmux</b> itself may set the title of the terminal in which the client is running, see the <b class="cmd">set-titles</b> option.<p>
A session's name is set with the <b class="cmd">new-session</b> and <b class="cmd">rename-session</b> commands. A window's name is set with one of:<ol style="margin-top: 0.00em;margin-bottom: 0.00em;" class="list list-enum">
<li class="list-enum" style="margin-top: 1.00em;">
A command argument (such as <b class="flag">&#45;n</b> for <b class="cmd">new-window</b> or <b class="cmd">new-session</b>).</li>
<li class="list-enum" style="margin-top: 1.00em;">
An escape sequence:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
$ printf '&#92;033kWINDOW_NAME&#92;033&#92;&#92;'</pre>
</li>
<li class="list-enum" style="margin-top: 1.00em;">
Automatic renaming, which sets the name to the active command in the window's active pane. See the <b class="cmd">automatic-rename</b> option.</li>
</ol>
<p>
When a pane is first created, its title is the hostname. A pane's title can be set via the OSC title setting sequence, for example:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
$ printf '&#92;033]2;My Title&#92;033&#92;&#92;'</pre>
</div>
<div class="section">
<h1 id="x454e5649524f4e4d454e54">ENVIRONMENT</h1> When the server is started, <b class="name">tmux</b> copies the environment into the <span class="emph">global environment</span>; in addition, each session has a <span class="emph">session environment</span>. When a window is created, the session and global environments are merged. If a variable exists in both, the value from the session environment is used. The result is the initial environment passed to the new process.<p>
The <b class="cmd">update-environment</b> session option may be used to update the session environment from the client when a new session is created or an old reattached. <b class="name">tmux</b> also initialises the <span class="env">TMUX</span> variable with some internal information to allow commands to be executed from inside, and the <span class="env">TERM</span> variable with the correct terminal setting of &#8216;<code class="lit">screen</code>&#8217;.<p>
Commands to alter and view the environment are:<dl style="margin-top: 0.00em;margin-bottom: 0.00em;" class="list list-tag">
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">set-environment</b> &#91;<span class="opt"><b class="flag">&#45;gru</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-session</i></span>&#93; <i class="arg">name</i> &#91;<span class="opt"><i class="arg">value</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">setenv</b>)</div>
</blockquote>
Set or unset an environment variable. If <b class="flag">&#45;g</b> is used, the change is made in the global environment; otherwise, it is applied to the session environment for <i class="arg">target-session</i>. The <b class="flag">&#45;u</b> flag unsets a variable. <b class="flag">&#45;r</b> indicates the variable is to be removed from the environment before starting a new process.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">show-environment</b> &#91;<span class="opt"><b class="flag">&#45;g</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-session</i></span>&#93; &#91;<span class="opt"><i class="arg">variable</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">showenv</b>)</div>
</blockquote>
Display the environment for <i class="arg">target-session</i> or the global environment with <b class="flag">&#45;g</b>. If <i class="arg">variable</i> is omitted, all variables are shown. Variables removed from the environment are prefixed with &#8216;<code class="lit">-</code>&#8217;.</dd>
</dl>
</div>
<div class="section">
<h1 id="x535441545553204c494e45">STATUS LINE</h1> <b class="name">tmux</b> includes an optional status line which is displayed in the bottom line of each terminal. By default, the status line is enabled (it may be disabled with the <b class="cmd">status</b> session option) and contains, from left-to-right: the name of the current session in square brackets; the window list; the title of the active pane in double quotes; and the time and date.<p>
The status line is made of three parts: configurable left and right sections (which may contain dynamic content such as the time or output from a shell command, see the <b class="cmd">status-left</b>, <b class="cmd">status-left-length</b>, <b class="cmd">status-right</b>, and <b class="cmd">status-right-length</b> options below), and a central window list. By default, the window list shows the index, name and (if any) flag of the windows present in the current session in ascending numerical order. It may be customised with the <i class="arg">window-status-format</i> and <i class="arg">window-status-current-format</i> options. The flag is one of the following symbols appended to the window name:<table style="margin-top: 0.00em;margin-bottom: 0.00em;margin-left: 5.00ex;" class="list list-col">
<col style="width: 0.25ex;">
<col style="min-width: 0.29ex;">
<tbody>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<span class="symb">Symbol</span></td>
<td class="list-col" style="margin-top: 1.00em;">
<span class="symb">Meaning</span></td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">*</code></td>
<td class="list-col" style="margin-top: 1.00em;">
Denotes the current window.</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">-</code></td>
<td class="list-col" style="margin-top: 1.00em;">
Marks the last window (previously selected).</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">#</code></td>
<td class="list-col" style="margin-top: 1.00em;">
Window is monitored and activity has been detected.</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">!</code></td>
<td class="list-col" style="margin-top: 1.00em;">
A bell has occurred in the window.</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">~</code></td>
<td class="list-col" style="margin-top: 1.00em;">
The window has been silent for the monitor-silence interval.</td>
</tr>
<tr class="list-col">
<td class="list-col" style="margin-top: 1.00em;">
<code class="lit">Z</code></td>
<td class="list-col" style="margin-top: 1.00em;">
The window's active pane is zoomed.</td>
</tr>
</tbody>
</table>
<p>
The # symbol relates to the <b class="cmd">monitor-activity</b> window option. The window name is printed in inverted colours if an alert (bell, activity or silence) is present.<p>
The colour and attributes of the status line may be configured, the entire status line using the <b class="cmd">status-style</b> session option and individual windows using the <b class="cmd">window-status-style</b> window option.<p>
The status line is automatically refreshed at interval if it has changed, the interval may be controlled with the <b class="cmd">status-interval</b> session option.<p>
Commands related to the status line are as follows:<dl style="margin-top: 0.00em;margin-bottom: 0.00em;" class="list list-tag">
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">command-prompt</b> &#91;<span class="opt"><b class="flag">&#45;I</b> <i class="arg">inputs</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;p</b> <i class="arg">prompts</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-client</i></span>&#93; &#91;<span class="opt"><i class="arg">template</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Open the command prompt in a client. This may be used from inside <b class="name">tmux</b> to execute commands interactively.<p>
If <i class="arg">template</i> is specified, it is used as the command. If present, <b class="flag">&#45;I</b> is a comma-separated list of the initial text for each prompt. If <b class="flag">&#45;p</b> is given, <i class="arg">prompts</i> is a comma-separated list of prompts which are displayed in order; otherwise a single prompt is displayed, constructed from <i class="arg">template</i> if it is present, or &#8216;<code class="lit">:</code>&#8217; if not.<p>
Both <i class="arg">inputs</i> and <i class="arg">prompts</i> may contain the special character sequences supported by the <b class="cmd">status-left</b> option.<p>
Before the command is executed, the first occurrence of the string &#8216;<code class="lit">%%</code>&#8217; and all occurrences of &#8216;<code class="lit">%1</code>&#8217; are replaced by the response to the first prompt, the second &#8216;<code class="lit">%%</code>&#8217; and all &#8216;<code class="lit">%2</code>&#8217; are replaced with the response to the second prompt, and so on for further prompts. Up to nine prompt responses may be replaced (&#8216;<code class="lit">%1</code>&#8217; to &#8216;<code class="lit">%9</code>&#8217;).</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">confirm-before</b> &#91;<span class="opt"><b class="flag">&#45;p</b> <i class="arg">prompt</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-client</i></span>&#93; <i class="arg">command</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">confirm</b>)</div>
</blockquote>
Ask for confirmation before executing <i class="arg">command</i>. If <b class="flag">&#45;p</b> is given, <i class="arg">prompt</i> is the prompt to display; otherwise a prompt is constructed from <i class="arg">command</i>. It may contain the special character sequences supported by the <b class="cmd">status-left</b> option.<p>
This command works only from inside <b class="name">tmux</b>.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">display-message</b> &#91;<span class="opt"><b class="flag">&#45;p</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;c</b> <i class="arg">target-client</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-pane</i></span>&#93; &#91;<span class="opt"><i class="arg">message</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">display</b>)</div>
</blockquote>
Display a message. If <b class="flag">&#45;p</b> is given, the output is printed to stdout, otherwise it is displayed in the <i class="arg">target-client</i> status line. The format of <i class="arg">message</i> is described in the <i class="link-sec"><a class="link-sec" href="#x464f524d415453">FORMATS</a></i> section; information is taken from <i class="arg">target-pane</i> if <b class="flag">&#45;t</b> is given, otherwise the active pane for the session attached to <i class="arg">target-client</i>.</dd>
</dl>
</div>
<div class="section">
<h1 id="x42554646455253">BUFFERS</h1> <b class="name">tmux</b> maintains a set of named <span class="emph">paste buffers</span>. Each buffer may be either explicitly or automatically named. Explicitly named buffers are named when created with the <b class="cmd">set-buffer</b> or <b class="cmd">load-buffer</b> commands, or by renaming an automatically named buffer with <b class="cmd">set-buffer</b> <b class="flag">&#45;n</b>. Automatically named buffers are given a name such as &#8216;<code class="lit">buffer0001</code>&#8217;, &#8216;<code class="lit">buffer0002</code>&#8217; and so on. When the <b class="cmd">buffer-limit</b> option is reached, the oldest automatically named buffer is deleted. Explicitly named are not subject to <b class="cmd">buffer-limit</b> and may be deleted with <b class="cmd">delete-buffer</b> command.<p>
Buffers may be added using <b class="cmd">copy-mode</b> or the <b class="cmd">set-buffer</b> and <b class="cmd">load-buffer</b> commands, and pasted into a window using the <b class="cmd">paste-buffer</b> command. If a buffer command is used and no buffer is specified, the most recently added automatically named buffer is assumed.<p>
A configurable history buffer is also maintained for each window. By default, up to 2000 lines are kept; this can be altered with the <b class="cmd">history-limit</b> option (see the <b class="cmd">set-option</b> command above).<p>
The buffer commands are as follows:<dl style="margin-top: 0.00em;margin-bottom: 0.00em;" class="list list-tag">
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">choose-buffer</b> &#91;<span class="opt"><b class="flag">&#45;F</b> <i class="arg">format</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-window</i></span>&#93; &#91;<span class="opt"><i class="arg">template</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Put a window into buffer choice mode, where a buffer may be chosen interactively from a list. After a buffer is selected, &#8216;<code class="lit">%%</code>&#8217; is replaced by the buffer name in <i class="arg">template</i> and the result executed as a command. If <i class="arg">template</i> is not given, &quot;paste-buffer -b '%%'&quot; is used. For the meaning of the <b class="flag">&#45;F</b> flag, see the <i class="link-sec"><a class="link-sec" href="#x464f524d415453">FORMATS</a></i> section. This command works only if at least one client is attached.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">clear-history</b> &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-pane</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">clearhist</b>)</div>
</blockquote>
Remove and free the history for the specified pane.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">delete-buffer</b> &#91;<span class="opt"><b class="flag">&#45;b</b> <i class="arg">buffer-name</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">deleteb</b>)</div>
</blockquote>
Delete the buffer named <i class="arg">buffer-name</i>, or the most recently added automatically named buffer if not specified.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">list-buffers</b> &#91;<span class="opt"><b class="flag">&#45;F</b> <i class="arg">format</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">lsb</b>)</div>
</blockquote>
List the global buffers. For the meaning of the <b class="flag">&#45;F</b> flag, see the <i class="link-sec"><a class="link-sec" href="#x464f524d415453">FORMATS</a></i> section.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">load-buffer</b> &#91;<span class="opt"><b class="flag">&#45;b</b> <i class="arg">buffer-name</i></span>&#93; <i class="arg">path</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">loadb</b>)</div>
</blockquote>
Load the contents of the specified paste buffer from <i class="arg">path</i>.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">paste-buffer</b> &#91;<span class="opt"><b class="flag">&#45;dpr</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;b</b> <i class="arg">buffer-name</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;s</b> <i class="arg">separator</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-pane</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">pasteb</b>)</div>
</blockquote>
Insert the contents of a paste buffer into the specified pane. If not specified, paste into the current one. With <b class="flag">&#45;d</b>, also delete the paste buffer. When output, any linefeed (LF) characters in the paste buffer are replaced with a separator, by default carriage return (CR). A custom separator may be specified using the <b class="flag">&#45;s</b> flag. The <b class="flag">&#45;r</b> flag means to do no replacement (equivalent to a separator of LF). If <b class="flag">&#45;p</b> is specified, paste bracket control codes are inserted around the buffer if the application has requested bracketed paste mode.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">save-buffer</b> &#91;<span class="opt"><b class="flag">&#45;a</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;b</b> <i class="arg">buffer-name</i></span>&#93; <i class="arg">path</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">saveb</b>)</div>
</blockquote>
Save the contents of the specified paste buffer to <i class="arg">path</i>. The <b class="flag">&#45;a</b> option appends to rather than overwriting the file.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">set-buffer</b> &#91;<span class="opt"><b class="flag">&#45;a</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;b</b> <i class="arg">buffer-name</i></span>&#93; &#91;<span class="opt"><b class="flag">&#45;n</b> <i class="arg">new-buffer-name</i></span>&#93; <i class="arg">data</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">setb</b>)</div>
</blockquote>
Set the contents of the specified buffer to <i class="arg">data</i>. The <b class="flag">&#45;a</b> option appends to rather than overwriting the buffer. The <b class="flag">&#45;n</b> option renames the buffer to <i class="arg">new-buffer-name</i>.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">show-buffer</b> &#91;<span class="opt"><b class="flag">&#45;b</b> <i class="arg">buffer-name</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">showb</b>)</div>
</blockquote>
Display the contents of the specified buffer.</dd>
</dl>
</div>
<div class="section">
<h1 id="x4d495343454c4c414e454f5553">MISCELLANEOUS</h1> Miscellaneous commands are as follows:<dl style="margin-top: 0.00em;margin-bottom: 0.00em;" class="list list-tag">
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">clock-mode</b> &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-pane</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Display a large clock.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">if-shell</b> &#91;<span class="opt"><b class="flag">&#45;b</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-pane</i></span>&#93; <i class="arg">shell-command command</i> &#91;<span class="opt"><i class="arg">command</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">if</b>)</div>
</blockquote>
Execute the first <i class="arg">command</i> if <i class="arg">shell-command</i> returns success or the second <i class="arg">command</i> otherwise. Before being executed, shell-command is expanded using the rules specified in the <i class="link-sec"><a class="link-sec" href="#x464f524d415453">FORMATS</a></i> section, including those relevant to <i class="arg">target-pane</i>. With <b class="flag">&#45;b</b>, <i class="arg">shell-command</i> is run in the background.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">lock-server</b></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">lock</b>)</div>
</blockquote>
Lock each client individually by running the command specified by the <b class="cmd">lock-command</b> option.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">run-shell</b> &#91;<span class="opt"><b class="flag">&#45;b</b></span>&#93; &#91;<span class="opt"><b class="flag">&#45;t</b> <i class="arg">target-pane</i></span>&#93; <i class="arg">shell-command</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">run</b>)</div>
</blockquote>
Execute <i class="arg">shell-command</i> in the background without creating a window. Before being executed, shell-command is expanded using the rules specified in the <i class="link-sec"><a class="link-sec" href="#x464f524d415453">FORMATS</a></i> section. With <b class="flag">&#45;b</b>, the command is run in the background. After it finishes, any output to stdout is displayed in copy mode (in the pane specified by <b class="flag">&#45;t</b> or the current pane if omitted). If the command doesn't return success, the exit status is also displayed.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">wait-for</b> &#91;<span class="opt"><b class="flag">&#45;L</b> | <b class="flag">&#45;S</b> | <b class="flag">&#45;U</b></span>&#93; <i class="arg">channel</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
(alias: <b class="cmd">wait</b>)</div>
</blockquote>
When used without options, prevents the client from exiting until woken using <b class="cmd">wait-for</b> <b class="flag">&#45;S</b> with the same channel. When <b class="flag">&#45;L</b> is used, the channel is locked and any clients that try to lock the same channel are made to wait until the channel is unlocked with <b class="cmd">wait-for</b> <b class="flag">&#45;U</b>. This command only works from outside <b class="name">tmux</b>.</dd>
</dl>
</div>
<div class="section">
<h1 id="x5445524d494e464f20455854454e53494f4e53">TERMINFO EXTENSIONS</h1> <b class="name">tmux</b> understands some extensions to <a class="link-man" href="/cgi-bin/man.cgi?query=terminfo&amp;sec=5">terminfo(5)</a>:<dl style="margin-top: 0.00em;margin-bottom: 0.00em;" class="list list-tag">
<dt class="list-tag" style="margin-top: 1.00em;">
<span class="emph">Cs</span>, <span class="emph">Cr</span></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Set the cursor colour. The first takes a single string argument and is used to set the colour; the second takes no arguments and restores the default cursor colour. If set, a sequence such as this may be used to change the cursor colour from inside <b class="name">tmux</b>:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
$ printf '&#92;033]12;red&#92;033&#92;&#92;'</pre>
</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<span class="emph">Ss</span>, <span class="emph">Se</span></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
Change the cursor style. If set, a sequence such as this may be used to change the cursor to an underline:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
$ printf '&#92;033[4 q'</pre>
<p>
If <span class="emph">Csr</span> is set, it will be used to reset the cursor style instead of <span class="emph">Cs</span>.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<span class="emph">Ms</span></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
This sequence can be used by <b class="name">tmux</b> to store the current buffer in the host terminal's selection (clipboard). See the <span class="emph">set-clipboard</span> option above and the <a class="link-man" href="/cgi-bin/man.cgi?query=xterm&amp;sec=1">xterm(1)</a> man page.</dd>
</dl>
</div>
<div class="section">
<h1 id="x434f4e54524f4c204d4f4445">CONTROL MODE</h1> <b class="name">tmux</b> offers a textual interface called <span class="emph">control mode</span>. This allows applications to communicate with <b class="name">tmux</b> using a simple text-only protocol.<p>
In control mode, a client sends <b class="name">tmux</b> commands or command sequences terminated by newlines on standard input. Each command will produce one block of output on standard output. An output block consists of a <span class="emph">%begin</span> line followed by the output (which may be empty). The output block ends with a <span class="emph">%end</span> or <span class="emph">%error</span>. <span class="emph">%begin</span> and matching <span class="emph">%end</span> or <span class="emph">%error</span> have two arguments: an integer time (as seconds from epoch) and command number. For example:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
%begin 1363006971 2 
0: ksh* (1 panes) [80x24] [layout b25f,80x24,0,0,2] @2 (active) 
%end 1363006971 2</pre>
<p>
In control mode, <b class="name">tmux</b> outputs notifications. A notification will never occur inside an output block.<p>
The following notifications are defined:<dl style="margin-top: 0.00em;margin-bottom: 0.00em;" class="list list-tag">
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">%exit</b> &#91;<span class="opt"><i class="arg">reason</i></span>&#93;</dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
The <b class="name">tmux</b> client is exiting immediately, either because it is not attached to any session or an error occurred. If present, <i class="arg">reason</i> describes why the client exited.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">%layout-change</b> <i class="arg">window-id</i> <i class="arg">window-layout</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
The layout of a window with ID <i class="arg">window-id</i> changed. The new layout is <i class="arg">window-layout</i>.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">%output</b> <i class="arg">pane-id</i> <i class="arg">value</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
A window pane produced output. <i class="arg">value</i> escapes non-printable characters and backslash as octal \xxx.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">%session-changed</b> <i class="arg">session-id</i> <i class="arg">name</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
The client is now attached to the session with ID <i class="arg">session-id</i>, which is named <i class="arg">name</i>.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">%session-renamed</b> <i class="arg">name</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
The current session was renamed to <i class="arg">name</i>.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">%sessions-changed</b></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
A session was created or destroyed.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">%unlinked-window-add</b> <i class="arg">window-id</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
The window with ID <i class="arg">window-id</i> was created but is not linked to the current session.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">%window-add</b> <i class="arg">window-id</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
The window with ID <i class="arg">window-id</i> was linked to the current session.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">%window-close</b> <i class="arg">window-id</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
The window with ID <i class="arg">window-id</i> closed.</dd>
<dt class="list-tag" style="margin-top: 1.00em;">
<b class="cmd">%window-renamed</b> <i class="arg">window-id</i> <i class="arg">name</i></dt>
<dd class="list-tag" style="margin-left: 6.00ex;">
The window with ID <i class="arg">window-id</i> was renamed to <i class="arg">name</i>.</dd>
</dl>
</div>
<div class="section">
<h1 id="x46494c4553">FILES</h1><dl style="margin-top: 0.00em;margin-bottom: 0.00em;" class="list list-tag">
<dt class="list-tag" style="margin-top: 0.00em;">
<i class="file">~/.tmux.conf</i></dt>
<dd class="list-tag" style="margin-left: 0.71ex;">
Default <b class="name">tmux</b> configuration file.</dd>
<dt class="list-tag" style="margin-top: 0.00em;">
<i class="file">/etc/tmux.conf</i></dt>
<dd class="list-tag" style="margin-left: 0.71ex;">
System-wide configuration file.</dd>
</dl>
</div>
<div class="section">
<h1 id="x4558414d504c4553">EXAMPLES</h1> To create a new <b class="name">tmux</b> session running <a class="link-man" href="/cgi-bin/man.cgi?query=vi&amp;sec=1">vi(1)</a>:<p>
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
<code class="lit">$ tmux new-session vi</code></div>
</blockquote>
<p>
Most commands have a shorter form, known as an alias. For new-session, this is <b class="cmd">new</b>:<p>
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
<code class="lit">$ tmux new vi</code></div>
</blockquote>
<p>
Alternatively, the shortest unambiguous form of a command is accepted. If there are several options, they are listed:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
$ tmux n 
ambiguous command: n, could be: new-session, new-window, next-window</pre>
<p>
Within an active session, a new window may be created by typing &#8216;<code class="lit">C-b c</code>&#8217; (Ctrl followed by the &#8216;<code class="lit">b</code>&#8217; key followed by the &#8216;<code class="lit">c</code>&#8217; key).<p>
Windows may be navigated with: &#8216;<code class="lit">C-b 0</code>&#8217; (to select window 0), &#8216;<code class="lit">C-b 1</code>&#8217; (to select window 1), and so on; &#8216;<code class="lit">C-b n</code>&#8217; to select the next window; and &#8216;<code class="lit">C-b p</code>&#8217; to select the previous window.<p>
A session may be detached using &#8216;<code class="lit">C-b d</code>&#8217; (or by an external event such as <a class="link-man" href="/cgi-bin/man.cgi?query=ssh&amp;sec=1">ssh(1)</a> disconnection) and reattached with:<p>
<blockquote style="margin-top: 0.00em;margin-bottom: 0.00em;">
<div class="display">
<code class="lit">$ tmux attach-session</code></div>
</blockquote>
<p>
Typing &#8216;<code class="lit">C-b ?</code>&#8217; lists the current key bindings in the current window; up and down may be used to navigate the list or &#8216;<code class="lit">q</code>&#8217; to exit from it.<p>
Commands to be run when the <b class="name">tmux</b> server is started may be placed in the <i class="file">~/.tmux.conf</i> configuration file. Common examples include:<p>
Changing the default prefix key:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
set-option -g prefix C-a 
unbind-key C-b 
bind-key C-a send-prefix</pre>
<p>
Turning the status line off, or changing its colour:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
set-option -g status off 
set-option -g status-style bg=blue</pre>
<p>
Setting other options, such as the default command, or locking after 30 minutes of inactivity:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
set-option -g default-command &quot;exec /bin/ksh&quot; 
set-option -g lock-after-time 1800</pre>
<p>
Creating new key bindings:<p>
<pre style="margin-left: 5.00ex;" class="lit display">
bind-key b set-option status 
bind-key / command-prompt &quot;split-window 'exec man %%'&quot; 
bind-key S command-prompt &quot;new-window -n %1 'ssh %1'&quot;</pre>
</div>

<div class="section">
<h1 id="x415554484f5253">AUTHORS</h1> <span class="author">Nicholas Marriott</span> &#60;<a class="link-mail" href="mailto:nicm@users.sourceforge.net">nicm@users.sourceforge.net</a>&#62;</div>
<table summary="Document Footer" class="foot" width="100%">
<col width="50%">
<col width="50%">
<tbody>
<tr>
<td class="foot-date">
August 11, 2014</td>
<td class="foot-os" align="right">
OpenBSD-current</td>
</tr>
</tbody>
</table>
</div>

</BODY>
</HTML>
